home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 003 / wampum32.arc / WAMPUM32.EXE / WAMPUM.DOC < prev    next >
Encoding:
Text File  |  1988-02-14  |  265.9 KB  |  5,483 lines

  1.  
  2.  
  3.  
  4.  
  5.           
  6.           
  7.           
  8.           
  9.           
  10.           
  11.           
  12.           
  13.           
  14.           
  15.                                 WAMPUM User's Guide
  16.           
  17.           
  18.                         Copyright (c) Ward Mundy, 1986, 1987.
  19.           
  20.                          
  21.                                 All Rights Reserved.
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.           1  Overview  . . . . . . . . . . . . . . . . . . . . . . . .    1
  29.              1.1  What is WAMPUM Anyway? . . . . . . . . . . . . . . .    1
  30.              1.2  Summary of Features  . . . . . . . . . . . . . . . .    1
  31.              1.3  New Features in Version 3.1  . . . . . . . . . . . .    2
  32.              1.4  System Requirements  . . . . . . . . . . . . . . . .    2
  33.              1.5  Getting Started  . . . . . . . . . . . . . . . . . .    3
  34.                 1.5.1  Loading the Program . . . . . . . . . . . . . .    3
  35.                    1.5.1.1  Where to Put It  . . . . . . . . . . . . .    3
  36.                    1.5.1.2  How to Run It  . . . . . . . . . . . . . .    3
  37.                 1.5.2  Maneuvering on the Main Menu  . . . . . . . . .    4
  38.              1.6  Quitting WAMPUM  . . . . . . . . . . . . . . . . . .    4
  39.              1.7  Using the Cursor & Function Keys . . . . . . . . . .    5
  40.           2  End-User Functions  . . . . . . . . . . . . . . . . . . .    6
  41.              2.1   Overview  . . . . . . . . . . . . . . . . . . . . .    6
  42.              2.2   A - ADDing New Records  . . . . . . . . . . . . . .    7
  43.              2.3   E - EDITing Records . . . . . . . . . . . . . . . .    8
  44.              2.4   D - DISPLAYing Records  . . . . . . . . . . . . . .   10
  45.              2.5   M - MARKing a Record for Deletion . . . . . . . . .   11
  46.              2.6   U - UNDELETing a Record . . . . . . . . . . . . . .   13
  47.              2.7   P - PRINTing Records  . . . . . . . . . . . . . . .   15
  48.              2.8   X - REBUILD/FileFix . . . . . . . . . . . . . . . .   16
  49.              2.9   S - SELECT Utilities  . . . . . . . . . . . . . . .   17
  50.                 2.9.1  Overview  . . . . . . . . . . . . . . . . . . .   17
  51.                 2.9.2  Record Selection Criteria . . . . . . . . . . .   18
  52.                 2.9.3  Listing File Contents . . . . . . . . . . . . .   23
  53.                 2.9.4  Changing Current Data Entry Menu  . . . . . . .   23
  54.                 2.9.5  Picking the Lead Index  . . . . . . . . . . . .   24
  55.                 2.9.6  Setting Browse Mode ON  . . . . . . . . . . . .   24
  56.                 2.9.7  Listing the File Structure  . . . . . . . . . .   25
  57.              2.10  R - REPORTS Generation  . . . . . . . . . . . . . .   25
  58.              2.11  L - LABELS Production . . . . . . . . . . . . . . .   26
  59.              2.12  T - FORM LETTER Generation  . . . . . . . . . . . .   27
  60.              2.13  W - WAMPUM Preformatted Output  . . . . . . . . . .   28
  61.              2.14  Printer Selection Screen  . . . . . . . . . . . . .   29
  62.                 2.14.1  Printed Output . . . . . . . . . . . . . . . .   29
  63.                 2.14.2  Output All Records . . . . . . . . . . . . . .   29
  64.                 2.14.3  Output Records Marked for Deletion . . . . . .   29
  65.              2.15  On-Line HELP  . . . . . . . . . . . . . . . . . . .   29
  66.           3  Developer Functions . . . . . . . . . . . . . . . . . . .   31
  67.              3.1   Creating A New Application  . . . . . . . . . . . .   31
  68.                 3.1.1   Overview of Application Development Strategy .   31
  69.                 3.1.2   Create A New SubDirectory  . . . . . . . . . .   32
  70.                 3.1.3   Building a New File  . . . . . . . . . . . . .   33
  71.                 3.1.4   Selecting the New File . . . . . . . . . . . .   34
  72.                 3.1.5   Revising the Existing File Structure . . . . .   34
  73.                 3.1.6   Indexing the New File  . . . . . . . . . . . .   35
  74.                    3.1.6.1  Overview . . . . . . . . . . . . . . . . .   35
  75.                    3.1.6.2  Creating New Indexes . . . . . . . . . . .   36
  76.                    3.1.6.3  Selecting Indexes  . . . . . . . . . . . .   37
  77.                 3.1.7   Printer Configuration (.MEM file)  . . . . . .   37
  78.                    3.1.7.1  Overview . . . . . . . . . . . . . . . . .   37
  79.                    3.1.7.2  Selecting an Existing Printer Table  . . .   38
  80.                    3.1.7.3  Creating a New Printer Table . . . . . . .   39
  81.                 3.1.8   Relating a Secondary File  . . . . . . . . . .   40
  82.                 3.1.9   Storing the New Configuration (WAMPUM.MEM) . .   41
  83.                 3.1.10  Building Reports, Labels, and Form Letters . .   41
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.                    3.1.10.1  REPORTS . . . . . . . . . . . . . . . . .   41
  95.                       3.1.10.1.1  Overview . . . . . . . . . . . . . .   41
  96.                       3.1.10.1.2  Creating A New Report Format . . . .   42
  97.                       3.1.10.1.3  Modifying Existing Report Formats  .   48
  98.                       3.1.10.1.4  Outputting MEMO fields in Reports  .   48
  99.                    3.1.10.2  LABELS  . . . . . . . . . . . . . . . . .   49
  100.                       3.1.10.2.1  Overview . . . . . . . . . . . . . .   49
  101.                       3.1.10.2.2  Creating A New Label Format  . . . .   50
  102.                       3.1.10.2.3  Modifying An Existing Label Format .   51
  103.                    3.1.10.3  FORM LETTERS  . . . . . . . . . . . . . .   52
  104.                       3.1.10.3.1  Overview . . . . . . . . . . . . . .   52
  105.                       3.1.10.3.2  Creating a New Form Letter File  . .   52
  106.                       3.1.10.3.3  Building Data in Form Letter File  .   52
  107.                       3.1.10.3.4  WAMPUM Field Data Expressions  . . .   54
  108.                 3.1.11  Building Function Key Macros (KEYS.DBF)  . . .   56
  109.                 3.1.12  Building Edit Checks (EDIT.DBF)  . . . . . . .   58
  110.                 3.1.13  Building Data Entry Menus (MENUS.DBF)  . . . .   64
  111.                 3.1.14  Building an Audit Trail File (AUDIT.DBF) . . .   66
  112.                 3.1.15  Preformatted Output (WAMPUM.DBF) . . . . . . .   66
  113.                    3.1.15.1  Overview  . . . . . . . . . . . . . . . .   66
  114.                    3.1.15.2  Building the WAMPUM File  . . . . . . . .   67
  115.                    3.1.15.3  Adding/Editing the WAMPUM File  . . . . .   67
  116.                 3.1.16  Resetting the Developer Password . . . . . . .   68
  117.                 3.1.17  Network Considerations . . . . . . . . . . . .   69
  118.                 3.1.18  Making a Backup of the User Application  . . .   70
  119.                 3.1.19  Writing the Documentation  . . . . . . . . . .   70
  120.              3.2   ! - RUNning an External Program . . . . . . . . . .   70
  121.              3.3   Z - ZOOMing or RELATing a Supplemental File . . . .   71
  122.              3.4   G - Global Replacement of Data  . . . . . . . . . .   72
  123.              3.5   C - Copy Utilities for Importing & Exporting Data .   73
  124.              3.6   Deleting & Undeleting Groups of Records . . . . . .   75
  125.              3.7   Reserved Variables, dBASE & Clipper Functions . . .   76
  126.                 3.7.1  Overview  . . . . . . . . . . . . . . . . . . .   76
  127.                 3.7.2  CHARACTER/STRING functions  . . . . . . . . . .   76
  128.                 3.7.3  DATE functions  . . . . . . . . . . . . . . . .   77
  129.                 3.7.4  DUPKEY("FIELDNAME") prevents duplicate keys . .   78
  130.                 3.7.5  EMPTY(fieldname) tests for empty fields . . . .   78
  131.                 3.7.6  LASTTIME field in data bases  . . . . . . . . .   79
  132.                 3.7.7  LASTUPDT field in data bases  . . . . . . . . .   79
  133.                 3.7.8  LASTUSER field in data bases  . . . . . . . . .   79
  134.                 3.7.9  MEMOTRAN(fieldname) outputs MEMO fields . . . .   79
  135.              3.8   PATH considerations   . . . . . . . . . . . . . . .   79
  136.              3.9   Enabling USERID's and Passwords . . . . . . . . . .   80
  137.              3.10  WAMPUM & DOS System Errors  . . . . . . . . . . . .   81
  138.              3.11  Credits . . . . . . . . . . . . . . . . . . . . . .   81
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.           1  Overview
  161.           
  162.           1.1  What is WAMPUM Anyway?
  163.           
  164.                Ward's Automated Menu Package Using Microcomputers (WAMPUM)
  165.           is a full-featured, menu-driven implementation of the dBASE III
  166.           programming language.  Version 3.1 adds network support while
  167.           remaining both an application development tool and an end-user
  168.           data base management system.  WAMPUM is a copyrighted work owned
  169.           by Ward Mundy.  The software is licensed for use under certain
  170.           terms and conditions which are displayed when you run or
  171.           terminate the running of the program.  A copy of the license
  172.           agreement accompanies this documentation.  Read the terms of the
  173.           license carefully before using or copying the software!  If you
  174.           do not agree with the license terms, you may discontinue use of
  175.           the software at any time. 
  176.           
  177.                Special thanks to Nantucket, Inc., the developer of Clipper,
  178.           the premier dBASE III compiler.  Without Clipper, there would be
  179.           no WAMPUM.  Clipper's flexibility and many enhancements over
  180.           Ashton-Tate's dBASE interpreters made development of WAMPUM a
  181.           true labor of love.  We also express our sincere appreciation to
  182.           Nantucket for authorizing the distribution of their REPORT.EXE
  183.           and LABEL.EXE programs to end-users without additional charge. 
  184.           These two programs simulate the dBASE III commands of CREATE
  185.           REPORT and CREATE LABEL and make WAMPUM a complete stand-alone
  186.           application development system without reliance upon any dBASE
  187.           interpreter.
  188.           
  189.           
  190.           1.2  Summary of Features
  191.           
  192.                As noted, WAMPUM provides much of the functionality of dBASE
  193.           III through its simple menu interface.  Some of the features
  194.           included in WAMPUM are outlined below.  For a more detailed look
  195.           at individual features, consult that section of the User's Guide.
  196.           
  197.                Key features include:
  198.           
  199.                *  Creation and use of dBASE III-compatible data bases
  200.                *  Complete multi-user network support using any dBASE file
  201.                *  Field types include: Char, Numeric, Date, Logical, Memo
  202.                *  Creation and use of up to 7 B-Tree Indexes per .DBF file
  203.                *  Add, Edit, Delete, & Undelete Records in any .DBF file
  204.                *  Display, List and Print Records from any .DBF file
  205.                *  10 Data Entry Screen Formats tailored to any application
  206.                *  Creation and use of dBASE III-compatible reports & labels
  207.                *  Creation and use of WAMPUM "mail merge" form letter files
  208.                *  Relation of second data base by key for any output format
  209.                *  Full-featured copy utilities to import & export any data
  210.                *  Creation of printer templates to support up to 10 fonts
  211.                *  Library of preformatted output forms with sort & select 
  212.                *  Library of edit-checks tailored to any .DBF file system
  213.                *  Library of macros tailored to any WAMPUM application
  214.                *  Calculated fields using standard dBASE expressions
  215.                *  File and index packing to restore damaged data bases
  216.  
  217.  
  218.  
  219.                                         - 1 -
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.                *  Automated Selection Assist for complex Boolean searches
  227.                *  Boolean searches of dBASE III-compatible MEMO fields
  228.                *  Audit Trail / Transaction Logging for multi-user tasks
  229.                *  NetBIOS-compatible record & file locking network support
  230.                *  Global search & replace of any data elements in one pass
  231.           
  232.           
  233.           1.3  New Features in Version 3.1
  234.           
  235.                WAMPUM 3.1 provides many new features as well as a number of
  236.           refinements suggested by existing users.  If you already are
  237.           using version 3.0, you may wish to scan the new features summary
  238.           below rather than re-reading the entire User's Guide.  For ease
  239.           of reference, new features are summarized here as well as in the
  240.           appropriate section of this User's Guide.
  241.           
  242.                Key new features of version 3.1 include:
  243.           
  244.                *  Complete multi-user network support using any dBASE file
  245.                *  NetBIOS-compatible record & file locking network support
  246.                *  Creation and use of up to 7 B-Tree Indexes per .DBF file
  247.                *  Global search & replace of 10 data elements in one pass
  248.                *  Manipulation of any 5 related data bases in form letters
  249.                *  Index key retrieval for production of single form letters
  250.                *  Automatic posting of LASTUSER information in data base
  251.                *  PASSWORD protection system for network environments
  252.                *  Customized USER configurations for network environments
  253.                *  Specification of particular fields for use in BROWSE mode
  254.                *  Simplified file structure modification like dBASE III's
  255.                *  Multi-drive support for storage of data bases & indexes
  256.                *  Forced field confirmation with <ENTER>, if desired
  257.                *  Enhanced documentation outlining many dBASE functions
  258.           
  259.           
  260.           1.4  System Requirements
  261.           
  262.                WAMPUM 3.1 may be used on any IBM PC-compatible computer
  263.           running DOS 2.0 or higher with a hard disk.  For multi-user
  264.           network applications, DOS 3.1 or higher is required on every
  265.           computer as well as an IBM NetBIOS-compatible network.  For
  266.           performance reasons, an 80286 or 80386 processor is desirable.
  267.           Minimum memory requirement is 320K above and beyond the memory
  268.           requirements of DOS and any memory-resident programs in use. 
  269.           Minimum memory is 420K (with DOS 3.1) to link to REPORT and LABEL
  270.           programs from within WAMPUM.  Without much in the way of
  271.           memory-resident software, WAMPUM typically needs 512K to operate
  272.           satisfactorily after loading DOS. WAMPUM will run on either a
  273.           monochrome or color display.  In the case of certain compatibles
  274.           such as Compaq, WAMPUM should be run in forced monochrome mode by
  275.           issuing the command WAMPUM MONO.
  276.           
  277.                Because WAMPUM creates a number of work files from time to
  278.           time, and because WAMPUM typically works with numerous files open
  279.           at the same time, you will need to make sure that when your
  280.  
  281.  
  282.  
  283.  
  284.  
  285.                                         - 2 -
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.           computer is started, a file named CONFIG.SYS exists in the root
  293.           directory of the boot disk.  This file must contain the following
  294.           entries with the minimum values shown:
  295.           
  296.                          FILES=20
  297.                          BUFFERS=24
  298.           
  299.                Failure to include the above commands will result in very
  300.           unpredictable behavior of WAMPUM which could destroy data bases
  301.           and indexes in use at the time of a very likely system crash!
  302.           
  303.           
  304.           1.5  Getting Started 
  305.           
  306.           1.5.1  Loading the Program
  307.           
  308.           1.5.1.1  Where to Put It
  309.           
  310.                WAMPUM is an executable program with the name WAMPUM.EXE. It
  311.           typically is distributed with several other programs including
  312.           REPORT.EXE, LABEL.EXE, and several printer configuration files
  313.           with a .MEM file extension.  All of these should be copied into a
  314.           directory on your hard disk which is included in the PATH command
  315.           whenever you start up your system.  This will assure that WAMPUM
  316.           can be run from any subdirectory on your hard disk.  If you are
  317.           not familiar with the path command, consult your DOS manual for
  318.           more details.  Simply stated, the PATH command tells DOS which
  319.           directories (other than the current one) should be searched
  320.           whenever you ask the computer to run a program.  In building
  321.           systems, typically we set aside a directory called \UTIL to store
  322.           applications software.  This directory is included in the path
  323.           command when the computer is started.  If you have such a
  324.           directory and it is in your PATH, then copy WAMPUM into this
  325.           directory.
  326.           
  327.           
  328.           1.5.1.2  How to Run It
  329.           
  330.                WAMPUM is designed to support two, very different audiences.
  331.           The first group is end-users, and the second is application
  332.           developers.  This design is implemented by providing two
  333.           different menus for the two groups. The end-user menu is designed
  334.           to let a user do the normal things that are done with a database:
  335.           adding, editing, and deleting  records; running reports and
  336.           labels; selecting the primary index for input and output of data;
  337.           and entering record selection criteria to narrow down which
  338.           records are produced in listings and reports.  Provision is also
  339.           made to allow the end-user to rebuild a damaged data base or
  340.           index typically occasioned by a power failure.  The end-user mode
  341.           is initiated by typing WAMPUM and pressing the <ENTER> key at the
  342.           DOS prompt.
  343.           
  344.                WAMPUM's developer mode contains all of the options outlined
  345.           above plus a number of additional options designed to allow a
  346.           person to develop a data base application for others to use.  You
  347.           do NOT have to be a programmer to become a good WAMPUM developer!
  348.  
  349.  
  350.  
  351.                                         - 3 -
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.           The developer's mode allows the creation of new data files and
  359.           indexes as well as reports, labels, and printer formats.  It also
  360.           provides access to the data files used to develop edit checks,
  361.           data entry menus, macros, preformatted output, and form letters.
  362.           Finally it allows for customization of applications through the
  363.           storing of a configuration identifying the files, indexes,
  364.           printer, and name of each application. The developer mode is
  365.           initiated by typing WAMPUM VOODOO and pressing the <ENTER> key at
  366.           the DOS prompt. 
  367.           
  368.                As previously noted, if you are using WAMPUM on a compatible
  369.           such as the COMPAQ which makes DOS think it has a color card even
  370.           when using a monochrome display, then you may want to force
  371.           WAMPUM into monochrome mode by starting it with WAMPUM MONO or
  372.           WAMPUM VOODOO MONO.
  373.           
  374.                WAMPUM also uses both a Report Writer (REPORT.EXE) and a
  375.           Label Generator (LABEL.EXE) to create report and label templates.
  376.           Depending upon the amount of memory in your machine, these
  377.           programs may or may not be able to run from within the WAMPUM
  378.           program itself.  This User's Guide explains the procedure for
  379.           running REPORT and LABEL from within WAMPUM.  If you lack the
  380.           necessary memory to do this, you may run the report writer from
  381.           the DOS prompt by typing REPORT filename where filename is the
  382.           name of the report template you wish to create or edit.  You may
  383.           run the label generator from the DOS prompt by typing LABEL
  384.           filename where filename is the name of the label template you
  385.           wish to create or edit.  
  386.           
  387.           
  388.           1.5.2  Maneuvering on the Main Menu
  389.           
  390.                Once you have started WAMPUM by executing one of the
  391.           commands outlined above, you will see the WAMPUM logo and then
  392.           the Main System Menu.  Note that just below the menu is a one-
  393.           line sentence of HELP regarding the highlighted option.  You move
  394.           between the options with the UP and DOWN cursor keys.  The HOME
  395.           key will take you to the first option on the menu, and the END
  396.           key will move you to the last option.
  397.           
  398.                Execute a choice on the Main System Menu by pressing the
  399.           <ENTER> key when the choice desired is highlighted or by typing
  400.           the LETTER corresponding to the choice you wish to run.  Using
  401.           the first letter method, you do not have to press <ENTER>.
  402.           
  403.                Exit from WAMPUM to DOS and end the program by pressing the
  404.           <ESC>ape key while the Main System Menu is displayed.
  405.           
  406.                Context-sensitive HELP on WAMPUM features is available by
  407.           pressing the F1 function key on any screen.
  408.           
  409.           
  410.           1.6  Quitting WAMPUM
  411.           
  412.                As indicated, the <ESC> key is pressed to exit from WAMPUM
  413.           to DOS from the Main System Menu.
  414.  
  415.  
  416.  
  417.                                         - 4 -
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.           1.7  Using the Cursor & Function Keys
  425.           
  426.                A number of keys have special functions within the WAMPUM
  427.           System.  Oftentimes, these keys are not the same as what you may
  428.           have used in previous dBASE III applications.  Please scan
  429.           through the summaries below before you attempt to either use or
  430.           build a WAMPUM application.  Throughout this manual, you will see
  431.           references to multiple key combinations such as CTRL-W or
  432.           ALT-F10.  Whenever you see a hyphenated key combination such as
  433.           these, it means hold down the first key, then tap the second key,
  434.           then release both keys.  For example, CTRL-W means hold down the
  435.           CTRL key, then tap the W key (case does not matter), then release
  436.           both keys.  ALT-F10 means hold down the ALT key, then tap the F10
  437.           function key, then release both keys.  We use the word "TAP"
  438.           advisedly.  Most PC's have a "keyboard buffer" which remembers
  439.           keystrokes which may not yet have been displayed.  Every key on
  440.           the PC acts like a repeating key on a selectric typewriter. Thus,
  441.           TAP means touch and release promptly!
  442.           
  443.                <ESC> is the all-purpose key which is used to get you out of
  444.           trouble.  From ANY screen, you can always press the ESCape key to
  445.           exit without preserving what you already were doing.  From the
  446.           Main Menu, pressing ESC will terminate WAMPUM and return you to
  447.           the computer's operating system level.
  448.           
  449.                Ctrl-W is WAMPUM's SAVE key.  Pressing CTRL-W typically
  450.           tells the computer to SAVE what is displayed on the screen and
  451.           move on to the next step.  If you are a previous dBASE III user,
  452.           then CTRL-W is equivalent to dBASE III's CTRL-End key.
  453.           
  454.                Ctrl-Home moves the user to the first field on a data entry
  455.           screen.
  456.           
  457.                Ctrl-End moves the user to the last field on a data entry
  458.           screen.
  459.           
  460.                <Enter> or <Down> Cursor completes an entry in a field and
  461.           moves the user to the next field, if any, on the screen.
  462.           
  463.                <Up> Cursor moves the user to the previous field, if any, on
  464.           the screen.
  465.           
  466.                <PgDn> signifies that data entry for this screen of data has
  467.           been completed and that the user wishes to SAVE the data and
  468.           continue.
  469.           
  470.                <PgUp> signifies that data entry for this screen of data has
  471.           been completed and that the user wishes to SAVE the data and
  472.           continue backwards through the data base (except when ADDing new
  473.           records to the data base).
  474.           
  475.                Ctrl-<Left> Cursor moves the cursor to the beginning of the
  476.           current data entry field.
  477.           
  478.                Ctrl-<Right> Cursor moves the cursor to the end of the
  479.           current data entry field.
  480.  
  481.  
  482.  
  483.                                         - 5 -
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.           
  491.                Ctrl-Y deletes the contents of the current field from the
  492.           cursor position to the end of the field.
  493.           
  494.                <Ins> toggles the computer between insert mode and
  495.           strike-over mode.  The word <INSERT> appears at the top of the
  496.           screen when INSERT mode is active.
  497.           
  498.                <Del> deletes the character currently under the cursor.
  499.           
  500.                F1 function key is the all-purpose HELP key.  It retrieves a
  501.           screenload of helpful hints which are keyed to your position in
  502.           the WAMPUM system.
  503.           
  504.                F2-F10 function keys are macros tailorable by the developer
  505.           to hold any character string desired.  The same is true for the
  506.           SHIFT, ALT, and CONTROL key combinations with the ten function
  507.           keys.  In short, 39 keyboard macros can be designed for each
  508.           WAMPUM application.
  509.           
  510.           
  511.           
  512.           2  End-User Functions
  513.           
  514.           2.1   Overview
  515.           
  516.                If you are just beginning to use WAMPUM, then skip to the
  517.           next section on Developer Functions after reading this overview. 
  518.           The developer's section will explain the step-by-step process for
  519.           building a new application.  This section is designed to acquaint
  520.           the end-user with information necessary to build and maintain an
  521.           existing data base as well as how to extract information from an
  522.           existing data base.
  523.           
  524.                End-users typically want to do two things with a data base.
  525.           They want to add or change information in an existing file (INPUT
  526.           functions), and they want to extract information from an existing
  527.           file (OUTPUT functions).
  528.           
  529.                In WAMPUM, INPUT consists of ADDing new records, EDITing
  530.           existing records, and DELETing or UNDELETing existing records.
  531.           For network applications, only one person can edit any individual
  532.           record at any given time.  Multiple people may be adding new
  533.           records at the same time.  And multiple people may be editing
  534.           different existing records at the same time.
  535.           
  536.                In WAMPUM, OUTPUT means you just want to look at or print
  537.           something which already exists in the file.  For network users,
  538.           multiple people can be outputting information from the same file
  539.           simultaneously.  ALL output falls into one of two categories:
  540.           single record output or multiple record output.  
  541.           
  542.                Single record OUTPUT is quick because it typically involves
  543.           retrieval of a single record by an indexed key.  This output may
  544.           consist of either DISPLAYing an individual record or PRINTing an
  545.           individual record.  In either case the end-user is prompted for
  546.  
  547.  
  548.  
  549.                                         - 6 -
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.           the key of the record to find, and WAMPUM will find it in less
  557.           than a second even with extremely large data bases.  The record
  558.           is displayed or printed in its entirety just as the information
  559.           is stored in the data base.
  560.           
  561.                Multiple record OUTPUT tends to be slower but more useful. 
  562.           It is slower because WAMPUM must make a full pass through the
  563.           data base to find the records desired for output.  It tends to be
  564.           more useful because the output typically is formatted in such a
  565.           way that the extracted data is more meaningful.  Multiple record
  566.           output ALWAYS involves three steps: (1) picking the lead index to
  567.           specify the order in which the records will appear in the output,
  568.           e.g. alphabetically, by date, or by part number; (2) selecting
  569.           (i.e. narrowing down) the group of records which should be output
  570.           using Boolean logic, e.g. find all the new accounts for January
  571.           or just the new accounts with sales over $1,000,000; and (3)
  572.           choosing the type of output desired: a list, report, mailing
  573.           labels, or a form letter. A billing statement, an overdue notice,
  574.           and monthly summary of accounts all are examples of multiple
  575.           record output which can easily be produced using WAMPUM.
  576.           
  577.                You simply must master the above concepts before use of any
  578.           data base management system can be of much value.  If you don't
  579.           understand the relationship between input and output and the
  580.           various types of output, put this User's Guide aside and try
  581.           reading this section again tomorrow.
  582.           
  583.           
  584.           2.2   A - ADDing New Records
  585.           
  586.                To add new records to any data base, that file must first be
  587.           selected.  Look at the bottom of the WAMPUM Main Menu to make
  588.           sure that the file you want to use is already selected.  If not,
  589.           it can be selected using the F - File Select option in developer
  590.           mode only.
  591.           
  592.                If the file you wish to work with is selected, then you
  593.           should also consider whether there are indexes which you want
  594.           automatically updated as you ADD new records to the file.  If so,
  595.           then these, too, must be selected before you ADD new records. 
  596.           You can determine which indexes are in use by looking at the
  597.           bottom of the Main System Menu screen.  New indexes can be
  598.           created and/or opened using the I - Index Sel/Create option in
  599.           developer mode only.
  600.           
  601.                Once you are working with the correct file and indexes, then
  602.           ADDing records is as simple as highlighting the A - Add a New
  603.           Record option and pressing <ENTER>. Or you may simply type an A
  604.           while the Main System Menu is displayed.
  605.           
  606.                The screen will clear and WAMPUM will display a data entry
  607.           screen with all of the fields in the current file.  It will
  608.           indicate the proposed new record number of this entry at the top
  609.           of the form. Type in the data you wish to enter for each field
  610.           using the UP and DOWN cursor keys to move from field to field.  
  611.           
  612.  
  613.  
  614.  
  615.                                         - 7 -
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.                If a file has a substantial number of fields, then all of
  623.           the fields may not fit on one data entry screen.  In this case,
  624.           the word *MORE* will appear in the bottom right corner of the
  625.           screen.  When you complete entry of data on the first screen,
  626.           then a second screen with the remaining fields will appear.
  627.           
  628.                Saving a new entry to the file can be accomplished in
  629.           several ways.  (1) Pressing <ENTER> while the cursor is
  630.           positioned in the last field of the last data entry screen will
  631.           save the record.  (2) Completely filling the last field with text
  632.           also will save the record.  (3) Pressing CTRL-W will save the new
  633.           record without displaying the remaining data entry screens if the
  634.           record requires more than one screen for data entry. (4) Pressing
  635.           <PgDn> in the last data entry screen of a record will also SAVE
  636.           the record.
  637.           
  638.                Aborting a new entry can be accomplished by pressing the
  639.           <ESC>ape key at any time before any of the SAVE methods outlined
  640.           above occur.  <PgUp> also aborts data entry in ADD mode only.
  641.           
  642.                WAMPUM supports updating of Memo fields in a slightly
  643.           different way than dBASE III.  If you wish to display or edit a
  644.           memo field, then first move the cursor to that field.  It will be
  645.           displayed on the screen with the field name followed by *MEMO*. 
  646.           Note that memo fields in WAMPUM appear to be logicial fields
  647.           which can accept True, False, Yes, or No as entries.  If you wish
  648.           to edit the memo field, simply set the logical field to True or
  649.           Yes by entering a T or Y.  When you complete entry of data for
  650.           this record and execute a SAVE using one of the methods outlined
  651.           above, the Memo editor will display any memo field marked True
  652.           and allow you to update it as desired.  You then can either SAVE
  653.           the updated Memo text by pressing Ctrl-W or ABORT the update and
  654.           leave the Memo text as it was by pressing <ESC>ape.
  655.           
  656.                After you ADD a new entry to the file, WAMPUM will display
  657.           another blank data entry screen thereby allowing you to add
  658.           another entry.  If you do not wish to add another entry, simply
  659.           press the <ESC>ape key to exit to the Main System Menu.
  660.           
  661.           
  662.           2.3   E - EDITing Records
  663.           
  664.                To edit records in any data base, that file must first be
  665.           selected and cannot be empty.  Look at the bottom of the WAMPUM
  666.           Main Menu to make sure that the file you want to use is already
  667.           selected.  If not, it can be selected using the F - File Select
  668.           option in developer mode only.
  669.           
  670.                If the file you wish to work with is selected, then you
  671.           should also consider whether there are indexes which you want
  672.           automatically updated as you EDIT records in the file.  If so,
  673.           then these, too, must be selected before you EDIT any records. 
  674.           You can determine which indexes are in use by looking at the
  675.           bottom of the Main System Menu screen.  New indexes can be
  676.           created and/or opened using the I - Index Sel/Create option in
  677.           developer mode only.
  678.  
  679.  
  680.  
  681.                                         - 8 -
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.           
  689.                Once you are working with the correct file and indexes, then
  690.           EDITing records is as simple as highlighting the E - Edit Record
  691.           option and pressing <ENTER>. Or you may simply type an E while
  692.           the Main System Menu is displayed.
  693.           
  694.                If you are not using indexes in conjunction with the file
  695.           being edited, then you will be prompted for the record number of
  696.           the record you wish to edit.  Simply type in the number desired
  697.           and press the <ENTER> key.  
  698.           
  699.                If you are using one or more indexes in conjunction with the
  700.           file being edited, then the first index displayed at the bottom
  701.           of the Main System Menu is considered the LEAD INDEX and will be
  702.           used to retrieve records.  If this is not the index you wish to
  703.           use for record retrieval, see the section on Select Utilities for
  704.           information on how to change the lead index.
  705.           
  706.                When editing with an index, you will be prompted to enter a
  707.           value for the field which is currently the LEAD INDEX.  With
  708.           character fields, you may enter all or part of a key, and WAMPUM
  709.           will search for a match on the portion of the key entered.  With
  710.           other types of fields, you must enter the exact key to find. Note
  711.           that capitalization is critical in finding matches.  If a
  712.           LASTNAME field in your data base contains an entry of SMITH and
  713.           you enter Smith as the key, then WAMPUM will not find the SMITH
  714.           you are looking for.
  715.           
  716.                Once you have entered either a record number or the key of
  717.           the record to find, WAMPUM will search for the first match. 
  718.           Assuming your application allows duplicate keys, there may be
  719.           more than one match on a particular key, e.g. there may be a
  720.           number of Smith's in your data base.  If the first data entry
  721.           screen displayed is not the Smith desired, then <PgDn> through
  722.           the records until the correct record is retrieved. 
  723.           
  724.                If you are using a data base with too many fields to fit on
  725.           one screen, then you may have to <PgDn> several times just to
  726.           move to the next record.  There currently is no key which can be
  727.           pressed to SKIP to the next record without first displaying all
  728.           of the edit screens for the current record.
  729.           
  730.                If you skip past the record desired, you can also back up
  731.           through the file in the order of the current key by pressing the
  732.           <PgUp> key at any time.
  733.           
  734.                Once the record is displayed which you desire to EDIT, move
  735.           to the fields to be edited using the UP and DOWN cursor keys. You
  736.           can change existing data for a field in several ways. (1) You may
  737.           type over the existing data.  (2) Or you may delete the existing
  738.           data by pressing CTRL-Y and then enter the new data.  (3) Or you
  739.           may INSERT new data into a field by positioning the cursor where
  740.           you want the insert to begin. Then press the <INS>ert key.
  741.           
  742.  
  743.  
  744.  
  745.  
  746.  
  747.                                         - 9 -
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.                With multi-screen records, you can move forward to the next
  755.           screen by pressing <PgDn>.  You cannot move backward within a
  756.           record by pressing <PgUp>.  <PgUp> will save the record and move
  757.           you to the previous record in the data base.
  758.           
  759.                As was true with ADD mode, you can edit Memo fields by
  760.           marking them True or Yes and then SAVing the record.  Similarly,
  761.           you SAVE edited records in the same way that you do in ADD mode
  762.           except that <PgUp> also executes a SAVE in EDIT mode and moves
  763.           you back one record.  CTRL-W saves the current record and prompts
  764.           you for the next record to find.  <PgDn> saves the current record
  765.           and then displays the next record in the file for editing.
  766.           
  767.                You can abort any EDIT by pressing <ESC>ape before any of
  768.           the SAVE actions outlined above occur.
  769.           
  770.                If you attempt to find a record which does not exist in the
  771.           data base, WAMPUM will display an error message and beep at you.
  772.           You then will be prompted to enter a key of another record to
  773.           find.  When you have searched for all the records desired, press
  774.           <ESC>ape to exit to the Main System Menu.
  775.           
  776.           
  777.           2.4   D - DISPLAYing Records
  778.           
  779.                To display records in any data base, that file must first be
  780.           selected and cannot be empty.  Look at the bottom of the WAMPUM
  781.           Main Menu to make sure that the file you want to use is already
  782.           selected.  If not, it can be selected using the F - File Select
  783.           option in developer mode only.
  784.           
  785.                If the file you wish to work with is selected, then you
  786.           should also consider whether there is an index which you want to
  787.           use for record retrieval.  If so, then this index must be
  788.           selected as the lead index before you DISPLAY any records.  
  789.           
  790.                Once you are working with the correct file and index, then
  791.           DISPLAYing records is as simple as highlighting the D - Display
  792.           Record option and pressing <ENTER>. Or you may simply type a D
  793.           while the Main System Menu is displayed.
  794.           
  795.                If you are not using indexes in conjunction with the file
  796.           being displayed, then you will be prompted for the record number
  797.           of the record you wish to display.  Simply type in the number
  798.           desired and press the <ENTER> key.  
  799.           
  800.                If you are using an index in conjunction with the file being
  801.           displayed, then the first index displayed at the bottom of the
  802.           Main System Menu is considered the LEAD INDEX and will be used to
  803.           retrieve records.  If this is not the index you wish to use for
  804.           record retrieval, see the section on Select Utilities.
  805.           
  806.                When displaying with an index, you will be prompted to enter
  807.           a value for the field which is currently the LEAD INDEX.  You may
  808.           enter all or part of a key, and WAMPUM will search for a match on
  809.           the portion of the key entered.  Note that capitalization is
  810.  
  811.  
  812.  
  813.                                        - 10 -
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.           critical in finding matches.  If a LASTNAME field in your data
  821.           base contains an entry of SMITH and you enter Smith as the key,
  822.           then WAMPUM will not find the SMITH you are looking for.
  823.           
  824.                Once you have entered either a record number or the key of
  825.           the record to find, WAMPUM will search for the first match. 
  826.           Assuming your application allows duplicate keys, there may be
  827.           more than one match on a particular key, e.g. there may be a
  828.           number of Smith's in your data base.  If the first data entry
  829.           screen displayed is not the Smith desired, then <PgDn> through
  830.           the records until the correct record is retrieved. 
  831.           
  832.                If you are using a data base with too many fields to fit on
  833.           one screen, then each time you press <PgDn>, WAMPUM will skip to
  834.           the next record.  It will NOT display the subsequent fields of
  835.           the current record as is the case in EDIT mode.  If you wish to
  836.           look at the subsequent fields of the current record, then press
  837.           the <ENTER> key rather than <PgDn>.  In addition, if there are
  838.           MEMO fields in the data base with which you are working, these
  839.           fields will show T if there is an entry in the field.  Otherwise,
  840.           the field will be marked F.  To display the first screen of
  841.           information in any MEMO field, just press <RETURN> rather than
  842.           <PgDn> on the last screen of the display of the standard fields.
  843.           If you need to look at the entire contents of of a MEMO field
  844.           rather than just the first screen, then you must use Edit mode.
  845.           
  846.                If you skip past the record desired, you can also back up
  847.           through the file in the order of the current key by pressing the
  848.           <PgUp> key at any time.
  849.           
  850.                You can abort any DISPLAY by pressing <ESC>ape key.
  851.           
  852.                If you attempt to find a record which does not exist in the
  853.           data base, WAMPUM will beep at you and prompt for another record
  854.           to find.  When you have displayed all the records desired, press
  855.           <ESC>ape to exit to the Main System Menu.
  856.           
  857.           
  858.           2.5   M - MARKing a Record for Deletion
  859.           
  860.                To mark records as deleted in any data base, that file must
  861.           first be selected and cannot be empty.  Look at the bottom of
  862.           the WAMPUM Main Menu to make sure that the file you want to use
  863.           is already selected.  If not, it can be selected using the F -
  864.           File Select option in developer mode only.
  865.           
  866.                If the file you wish to work with is selected, then you
  867.           should also consider whether there is an index which you want to
  868.           use for record retrieval.  If so, then this index must be
  869.           selected as the lead index before you attempt to DELETE any
  870.           records.  
  871.           
  872.                Once you are working with the correct file and index, then
  873.           marking records DELETED is as simple as highlighting the M - Mark
  874.           Record *DEL* option and pressing <ENTER>. Or you may simply type
  875.           an M while the Main System Menu is deleteed.
  876.  
  877.  
  878.  
  879.                                        - 11 -
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.           
  887.                If you are not using indexes in conjunction with the file,
  888.           then you will be prompted for the record number of the record you
  889.           wish to mark deleted.  Simply type in the number desired and
  890.           press the <ENTER> key.  
  891.           
  892.                If you are using an index in conjunction with the file, then
  893.           the first index displayed at the bottom of the Main System Menu
  894.           is considered the LEAD INDEX and will be used to retrieve
  895.           records.  If this is not the index you wish to use for record
  896.           retrieval, see the section on Select Utilities.
  897.           
  898.                When using an index, you will be prompted to enter a value
  899.           for the field which is currently the LEAD INDEX.  You may enter
  900.           all or part of a key, and WAMPUM will search for a match on the
  901.           portion of the key entered.  Note that capitalization is critical
  902.           in finding matches.  If a LASTNAME field in your data base
  903.           contains an entry of SMITH and you enter Smith as the key, then
  904.           WAMPUM will not find the SMITH you are looking for.
  905.           
  906.                Once you have entered either a record number or the key of
  907.           the record to find, WAMPUM will search for the first match. 
  908.           Assuming your application allows duplicate keys, there may be
  909.           more than one match on a particular key, e.g. there may be a
  910.           number of Smith's in your data base.  If the first entry
  911.           displayed is not the Smith desired, then <PgDn> through the
  912.           records until the correct record is retrieved. 
  913.           
  914.                If you are using a data base with too many fields to fit on
  915.           one screen, note that WAMPUM will only display the first screen
  916.           of data for each record while in DELETE mode.  
  917.           
  918.                If you skip past the record desired, you can also back up
  919.           through the file in the order of the current key by pressing the
  920.           <PgUp> key at any time.
  921.           
  922.                Once you find the record you wish to mark DELETED, then
  923.           answer the DELETE prompt by entering a T for True or Y for Yes,
  924.           and the record will be marked deleted.
  925.           
  926.                You can abort any search by pressing <ESC>ape key.
  927.           
  928.                If you attempt to find a record which does not exist in the
  929.           data base, WAMPUM will beep at you and prompt for another record
  930.           to find.  When you have deleted all the records desired, press
  931.           <ESC>ape to exit to the Main System Menu.
  932.           
  933.                NOTE:  WAMPUM uses the same conventions as dBASE III insofar
  934.           as deleted records are concerned.  Deleted records are not really
  935.           deleted.  They are simply marked with an asterisk (*) in the
  936.           first record position which signifies that they will be deleted
  937.           the next time the file is rebuilt using the X - REBUILD/FileFix
  938.           option.  At any time before you rebuild the file, any record
  939.           marked as deleted can be restored using U - UN*DEL* records.  The
  940.  
  941.  
  942.  
  943.  
  944.  
  945.                                        - 12 -
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.           primary significance of marking records for deletion is that they
  953.           will not ordinarily print out when reports, labels, or form
  954.           letters are produced.  
  955.           
  956.                Do NOT mark records as DELETED as a means of maintaining a
  957.           historical data base!  The first time a power failure occurs, you
  958.           may be forced to rebuild a file or index which automatically and
  959.           permanently deletes ALL records marked for deletion.  A better
  960.           approach is to add a field to your data base which can be used to
  961.           mark records as inactive or closed.
  962.           
  963.                Sometimes it is desirable to be able to mark a group of
  964.           records as deleted in one pass rather than having to call up each
  965.           record and mark it for deletion individually.  If you start
  966.           WAMPUM with the developer's password, you may do this IF all of
  967.           the following conditions are met.
  968.           
  969.                     (1)  The file must be indexed on a character field and
  970.                          that field must be the current (first) index.
  971.           
  972.                     (2)  Record selection criteria must have been specified
  973.                          using S - Select Utilities. It is a very good idea
  974.                          to get a listing of records meeting the criteria
  975.                          BEFORE actually marking the records *DELETED*!
  976.           
  977.                     (3)  Pick the M - Mark Records *DEL* option and when
  978.                          prompted for the value to find, type an asterisk
  979.                          and press <ENTER>.
  980.           
  981.                     (4)  You will be warned one last time that the selected
  982.                          group of records are about to be marked *DELETED*.
  983.                          Type Y to proceed.
  984.           
  985.           
  986.           2.6   U - UNDELETing a Record
  987.           
  988.                To undelete records marked as deleted in any data base, that
  989.           file must first be selected and cannot be empty.  Look at the
  990.           bottom of the WAMPUM Main Menu to make sure that the file you
  991.           want to use is already selected.  If not, it can be selected
  992.           using the F - File Select option in developer mode only.
  993.           
  994.                If the file you wish to work with is selected, then you
  995.           should also consider whether there is an index which you want to
  996.           use for record retrieval.  If so, then this index must be
  997.           selected as the lead index before you attempt to UNDELETE any
  998.           records.  
  999.           
  1000.                Once you are working with the correct file and index, then
  1001.           marking records UNDELETED is as simple as highlighting the U -
  1002.           UN*DEL* Records option and pressing <ENTER>. Or you may simply
  1003.           type a U while the Main System Menu is deleteed.
  1004.           
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.                                        - 13 -
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.                If you are not using indexes in conjunction with the file,
  1019.           then you will be prompted for the record number of the record you
  1020.           wish to undelete.  Simply type in the number desired and press
  1021.           the <ENTER> key.  
  1022.           
  1023.                If you are using an index in conjunction with the file, then
  1024.           the first index displayed at the bottom of the Main System Menu
  1025.           is considered the LEAD INDEX and will be used to retrieve
  1026.           records.  If this is not the index you wish to use for record
  1027.           retrieval, see the section on Select Utilities.
  1028.           
  1029.                When using an index, you will be prompted to enter a value
  1030.           for the field which is currently the LEAD INDEX.  You may enter
  1031.           all or part of a key, and WAMPUM will search for a match on the
  1032.           portion of the key entered.  Note that capitalization is critical
  1033.           in finding matches.  If a LASTNAME field in your data base
  1034.           contains an entry of SMITH and you enter Smith as the key, then
  1035.           WAMPUM will not find the SMITH you are looking for.
  1036.           
  1037.                Once you have entered either a record number or the key of
  1038.           the record to find, WAMPUM will search for the first match. 
  1039.           Assuming your application allows duplicate keys, there may be
  1040.           more than one match on a particular key, e.g. there may be a
  1041.           number of Smith's in your data base.  If the first entry
  1042.           displayed is not the Smith desired, then <PgDn> through the
  1043.           records until the correct record is retrieved. 
  1044.           
  1045.                If you are using a data base with too many fields to fit on
  1046.           one screen, note that WAMPUM will only display the first screen
  1047.           of data for each record while in UNDELETE mode.  
  1048.           
  1049.                If you skip past the record desired, you can also back up
  1050.           through the file in the order of the current key by pressing the
  1051.           <PgUp> key at any time.
  1052.           
  1053.                Once you find the record you wish to UNDELETE, then answer
  1054.           the restore prompt by entering a T for True or Y for Yes, and the
  1055.           record will be restored to the data base as an active record.
  1056.           
  1057.                You can abort any search by pressing <ESC>ape key.
  1058.           
  1059.                If you attempt to find a record which does not exist in the
  1060.           data base, WAMPUM will beep at you and prompt for another record
  1061.           to find.  When you have undeleted all the records desired, press
  1062.           <ESC>ape to exit to the Main System Menu.
  1063.           
  1064.                NOTE:  WAMPUM uses the same conventions as dBASE III insofar
  1065.           as deleted records are concerned.  Deleted records are not really
  1066.           deleted.  They are simply marked with an asterisk (*) in the
  1067.           first record position which signifies that they will be deleted
  1068.           the next time the file is rebuilt using the X - REBUILD/FileFix
  1069.           option.  At any time before you rebuild the file, any record
  1070.           marked as deleted can be restored using U - UN*DEL* records.  The
  1071.           down side of this is that once the X option has been run on a
  1072.           file, you can no longer UNDELETE records marked for deletion
  1073.           since they have been permanently deleted from the data base.
  1074.  
  1075.  
  1076.  
  1077.                                        - 14 -
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.           
  1085.                Sometimes it is desirable to be able to undelete a group of
  1086.           records in one pass rather than having to call up each record and
  1087.           restore it individually. If you start WAMPUM with the developer's
  1088.           password, you may do this IF all of the following conditions are
  1089.           met.
  1090.           
  1091.                     (1)  The file must be indexed on a character field and
  1092.                          that field must be the current (first) index.
  1093.           
  1094.                     (2)  Record selection criteria must have been specified
  1095.                          using S - Select Utilities. It is a very good idea
  1096.                          to get a listing of records meeting the criteria
  1097.                          BEFORE actually restoring the records!
  1098.           
  1099.                     (3)  Pick the U - UN*DEL* Records option and when
  1100.                          prompted for the value to find, type an asterisk
  1101.                          and press <ENTER>.
  1102.           
  1103.                     (4)  You will be warned one last time that the selected
  1104.                          group of records are about to be restored. Type Y
  1105.                          to proceed.
  1106.           
  1107.           
  1108.           2.7   P - PRINTing Records
  1109.           
  1110.                To print individual records from any data base, that file
  1111.           must first be selected and cannot be empty.  Look at the bottom
  1112.           of the WAMPUM Main Menu to make sure that the file you want to
  1113.           use has already been selected.  If not, it can be selected using
  1114.           the F - File Select option in developer mode only.  
  1115.           
  1116.                Also make certain that WAMPUM is configured to match the
  1117.           printer you currently are using.  This can be changed by
  1118.           selecting the # - PRINTER Config option in developer mode only.
  1119.           If no printer has been selected, WAMPUM will print in generic
  1120.           mode, meaning it outputs pure ASCII text.
  1121.           
  1122.                If the file you wish to work with is selected, then you
  1123.           should also consider whether there is an index which you want to
  1124.           use for record retrieval.  If so, then this index must be
  1125.           selected as the lead index before you PRINT any records.  
  1126.           
  1127.                Once you are working with the correct file and index, then
  1128.           PRINTing records is as simple as highlighting the P - Print
  1129.           Record(s) option and pressing <ENTER>. Or you may simply type a P
  1130.           while the Main System Menu is displayed.
  1131.           
  1132.                If you are not using indexes in conjunction with the file,
  1133.           then you will be prompted for the record number of the record you
  1134.           wish to retrieve.  Simply type in the number desired and press
  1135.           the <ENTER> key.  
  1136.           
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143.                                        - 15 -
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.                If you are using an index in conjunction with the file, then
  1151.           the first index displayed at the bottom of the Main System Menu
  1152.           is considered the LEAD INDEX and will be used to retrieve
  1153.           records.  If this is not the index you wish to use for record
  1154.           retrieval, see the section on Select Utilities.
  1155.           
  1156.                When printing records with index retrieval, you will be
  1157.           prompted to enter a value for the field which is currently the
  1158.           LEAD INDEX.  You may enter all or part of a key, and WAMPUM will
  1159.           search for a match on the portion of the key entered.  Note that
  1160.           capitalization is critical in finding matches.  If a LASTNAME
  1161.           field in your data base contains an entry of SMITH and you enter
  1162.           Smith as the key, then WAMPUM will not find the SMITH you are
  1163.           looking for.
  1164.           
  1165.                Once you have entered either a record number or the key of
  1166.           the record to find, WAMPUM will search for the first match. 
  1167.           Assuming your application allows duplicate keys, there may be
  1168.           more than one match on a particular key, e.g. there may be a
  1169.           number of Smith's in your data base.  If the screen displayed is
  1170.           not the Smith desired, then <PgDn> through the records until the
  1171.           correct record is retrieved. 
  1172.           
  1173.                If you are using a data base with too many fields to fit on
  1174.           one screen, then only as many fields as will fit on a single
  1175.           screen will be displayed.  To get a print out of the entire
  1176.           record displayed plus the contents of any MEMO fields, answer the
  1177.           Print Record? prompt by typing a T or Y.  Make certain that your
  1178.           printer is turned ON and is ON LINE.
  1179.           
  1180.                If you skip past the record desired, you can also back up
  1181.           through the file in the order of the current key by pressing the
  1182.           <PgUp> key at any time.
  1183.           
  1184.                You can abort a PRINT records session by pressing the
  1185.           <ESC>ape key.
  1186.           
  1187.                If you attempt to find a record which does not exist in the
  1188.           data base, WAMPUM will beep at you and prompt for another record
  1189.           to find.  When you have printed all the records desired, press
  1190.           <ESC>ape to exit to the Main System Menu.
  1191.           
  1192.           
  1193.           2.8   X - REBUILD/FileFix
  1194.           
  1195.                Computers are very temperamental when it comes to
  1196.           electricity.  Power fluctuations will cause all sorts of
  1197.           undesired results when working with any data base.  In network
  1198.           environments, power is even more critical.  WAMPUM provides the
  1199.           X- REBUILD/FileFix option as a tool to assist in rebuilding data
  1200.           bases and indexes which typically have been corrupted by power
  1201.           problems.  This option obviously does not take the place of a
  1202.           reliable source of electricity.  If you are having to use this
  1203.           option frequently, then you should seriously consider an
  1204.           uninterruptible power supply if you value your data!  This option
  1205.           now provides three features to assist in file maintenance: (1)
  1206.  
  1207.  
  1208.  
  1209.                                        - 16 -
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.           data base file packing which automatically rebuilds active
  1217.           indexes as well, (2) memo file packing which compresses free-form
  1218.           text entered into memo fields, and (3) reindexing which rebuilds
  1219.           index files associated with a data base.
  1220.           
  1221.                (1)  The file packing option rebuilds the entire data base
  1222.           file and resets the end-of-file pointer which oftentimes is
  1223.           damaged by a power outage.  If there are active indexes, these
  1224.           are reindexed as well.  Be forewarned that this option
  1225.           automatically and permanently DELETES any records marked for
  1226.           deletion.  Make certain that you have UNDELETED any records you
  1227.           wish to preserve before executing the file rebuild option!
  1228.           
  1229.                (2)  Memo file packing is NOT included in the dBASE file
  1230.           packing algorithm hence packing a data base file does not affect
  1231.           the memo file at all.  For those new to the world of dBASE, you
  1232.           should be aware that any time a data base is created which
  1233.           includes one or more memo fields, a separate file automatically
  1234.           is created to store the contents of these fields.  It has the
  1235.           same file name as the main data base; however, the file extension
  1236.           is .DBT.  As you add data to memo fields, the actual text is
  1237.           stored in the .DBT file while a pointer (an address) is stored in
  1238.           the actual data base file itself.  Virtually any time a memo
  1239.           field is revised and expanded even slightly, the entire contents
  1240.           of that memo field is rewritten to the end of the .DBT file, and
  1241.           the pointer is adjusted accordingly.  Over time, the size of the
  1242.           .DBT file grows geometrically depending upon how often your memo
  1243.           fields are revised.  Previous copies of memo fields are never
  1244.           deleted from the .DBT file.  They merely occupy space.  To delete
  1245.           them, you must actually execute a dBASE COPY of the data base and
  1246.           then rename the file back to the original name.  WAMPUM's memo
  1247.           file packing option does this for you automatically.  Before
  1248.           executing this option, always make a backup of your original data
  1249.           base including the .DBT memo file.  Also make certain that your
  1250.           default drive has adequate space to house a temporary duplicate
  1251.           of both the .DBF and .DBT files which will be copied and then
  1252.           renamed!
  1253.           
  1254.                (3)  Reindexing is a tool which oftentimes will cure damage
  1255.           from power problems without actually rebuilding the data base
  1256.           itself.  The principal advantage to reindexing rather than file
  1257.           packing is that it does not delete records marked for deletion in
  1258.           the main data base.  If this is a concern, you may wish to try
  1259.           this option to repair damage before choosing file packing.  If
  1260.           you do select the file packing, reindexing is performed without
  1261.           selecting this option.
  1262.           
  1263.           
  1264.           2.9   S - SELECT Utilities
  1265.           
  1266.           2.9.1  Overview
  1267.           
  1268.                The Select Utilities option in WAMPUM provides end-user
  1269.           access to the two most critical elements in extracting data from
  1270.           a data base: record selection and sorting.  Sorting in WAMPUM is
  1271.  
  1272.  
  1273.  
  1274.  
  1275.                                        - 17 -
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.           handled through changing the lead index.  Thus, the Select
  1283.           Utilities option also provides the means for setting the primary
  1284.           index for record retrieval purposes.  
  1285.           
  1286.                Four other dBASE III functions are provided through the
  1287.           Select Utilities option: LIST FILE CONTENTS, to generate quick
  1288.           report listings with up to 9 fields; CHANGE DATA ENTRY MENUS,
  1289.           which allows a user to select from up to 10 different data entry
  1290.           menus; and BROWSE MODE, to scan through a group of records; and
  1291.           LIST STRUCTURE, which displays or prints a listing of the field
  1292.           structure of the data base file in use.  
  1293.           
  1294.                No User's Guide can do justice to the topic of Boolean logic
  1295.           which is record selection in both WAMPUM and dBASE III.  There
  1296.           are numerous books including a number of dBASE III primers which
  1297.           cover record selection in much more detail than what is addressed
  1298.           here.  Many are available without charge through your public
  1299.           library.  For anyone to get the most out of WAMPUM, you must
  1300.           master record selection since it is the critical element in
  1301.           identifying which records should and should not be extracted in
  1302.           reports, labels, and form letters.
  1303.           
  1304.           
  1305.           2.9.2  Record Selection Criteria
  1306.           
  1307.                Record Selection, which is the dBASE implementation of
  1308.           Boolean logic, is the process by which you tell the computer
  1309.           which records should and should not be extracted in producing
  1310.           reports, labels, and form letters.
  1311.           
  1312.                With the exception of logical fields, the syntax for record
  1313.           selection typically is FIELDNAME relational operator VALUE.  The
  1314.           syntax for logical fields is simpler.  Assuming a logical field
  1315.           exists in your data base called MARRIED, if you want to find all
  1316.           the records in which the MARRIED field is True, the Boolean
  1317.           expression is simply the field name itself: MARRIED.  If you want
  1318.           to find all those in which the MARRIED field is False, the
  1319.           correct expression is .NOT. MARRIED.  Any record selection
  1320.           expression can be linked to another expression with one of two
  1321.           connectors: .AND. or .OR.  The other cardinal rule is that
  1322.           expressions on both sides of the relational operator must be of
  1323.           the same type.  Thus, if a field is a character field then the
  1324.           value must be a character string.  If the field is a date field,
  1325.           then the value must be a date.  Finally, unlike dBASE III, memo
  1326.           fields can be searched for matches using record selection and
  1327.           should be treated as if they were character fields, i.e. enclose
  1328.           the search values in quotes just as you would a charcter string!
  1329.           
  1330.                Whenever you run a report, label, or form letter, WAMPUM
  1331.           always checks to see if Record Selection Criteria are in effect. 
  1332.           If so, it scans the data base for records whose field entries
  1333.           are TRUE when evaluated against the complete Record Selection
  1334.           Criteria then in effect.
  1335.           
  1336.           
  1337.           
  1338.  
  1339.  
  1340.  
  1341.                                        - 18 -
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.                WAMPUM currently supports eight relational operators:
  1349.           
  1350.                       OPERATOR     MEANING        
  1351.           
  1352.                           =        Equals; matches; begins with.
  1353.                          <>        Not equals.
  1354.                           >        Greater than; more than.
  1355.                          >=        Greater than or equal; at least.
  1356.                           <        Less than.
  1357.                          <=        Less than or equal; at most.
  1358.                           $        Is contained in.
  1359.                     .NOT. $        Is not contained in.
  1360.           
  1361.                The best way to master record selection is by reviewing some
  1362.           examples and finding one that closely matches what you want to
  1363.           do.  For this purpose, let us assume that you are working with a
  1364.           data base with the following file structure:
  1365.           
  1366.                FIELD NAME     FIELD TYPE     FIELD LEN      FIELD DEC
  1367.           
  1368.                LASTNAME           C             20              0
  1369.                ACCTNO             N              5              0
  1370.                ENTRYDT            D              8              0
  1371.                MARRIED            L              1              0
  1372.                COMMENTS           M             10              0
  1373.           
  1374.                Now let us assume that there are three records in the file
  1375.           with the following values:
  1376.           
  1377.                FIELD NAME     RECORD #1      RECORD #2      RECORD #3
  1378.           
  1379.                LASTNAME       Mundy          Johns          Johnston
  1380.                ACCTNO         12345          1234           123
  1381.                ENTRYDT        10/01/85       10/31/85       11/01/85
  1382.                MARRIED        .T.            .F.            .F.
  1383.                COMMENTS       None           None           None
  1384.           
  1385.                What follows are a number of examples showing the correct
  1386.           record selection syntax, what the expression means in plain
  1387.           English, and which records would be selected by the expression.
  1388.           
  1389.           
  1390.           Criteria: LAST NAME = Johns
  1391.           English:  Find all entries where the last name is Johns.
  1392.           Selected: No records.
  1393.           Comments: Not only will no records be selected but WAMPUM will
  1394.                     display a System Error forcing termination of the
  1395.                     program by typing Q.  FIELD NAMES are words of art
  1396.                     which must be spelled exactly as they appear in the
  1397.                     data base structure.  While LAST NAME is fine for
  1398.                     English, WAMPUM doesn't know LAST NAME from the MOON.
  1399.                     The correct field name is LASTNAME with no spaces!
  1400.                     Since LASTNAME is a character field, the value also
  1401.                     must be a character string which means it must be
  1402.                     enclosed in quotation marks.  Either error would have
  1403.                     triggered a System Error.  Currently, there is no way
  1404.  
  1405.  
  1406.  
  1407.                                        - 19 -
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.                     to check for correct syntax before you actually run a
  1415.                     report, label, or form letter.  Then it's too late!
  1416.           
  1417.           Criteria: LASTNAME="Johns"
  1418.           English:  Find all entries where the LASTNAME begins with Johns.
  1419.           Selected: Records 2 and 3.
  1420.           Comments: Note that EQUALS is not pure equivalency in WAMPUM, but
  1421.                     more accurately means "begins with."  If you want exact
  1422.                     equivalence, fill out the field with enough spaces to
  1423.                     assure that the match will force equivalence, e.g.
  1424.                     LASTNAME="Johns  " would select only Record 2.
  1425.           
  1426.           Criteria: LASTNAME="Johns" .AND. ACCTNO=123
  1427.           English:  Find all entries where LASTNAME begins with Johns AND
  1428.                     the account number is 123.
  1429.           Selected: Record 3.
  1430.           Comments: For every rule, there is an exception. Equals means
  1431.                     exactly equals with numeric fields.  Here the account
  1432.                     number is numeric while the LASTNAME field is not.  
  1433.                     Note that BOTH expressions must be true for a record
  1434.                     to qualify since the expressions are joined with .AND.
  1435.                     Note also that the character string value must be in
  1436.                     quotes to match the character field LASTNAME while the
  1437.                     numeric value is NOT in quotes to match the numeric
  1438.                     field ACCTNO.
  1439.           
  1440.           Criteria: LASTNAME="Mundy" .AND. LASTNAME="Johns"
  1441.           English:  Find all entries where LASTNAME is Mundy and Johns.
  1442.           Selected: No records.
  1443.           Comments: Pure English will sometimes get you into trouble.
  1444.                     A common beginner's mistake is to mix up .AND. and
  1445.                     .OR.  Remember: .AND. means BOTH expressions must
  1446.                     be True.  .OR. means if EITHER is True.  Here, no
  1447.                     one has a LASTNAME of Mundy AND Johns.  All entries
  1448.                     have a LASTNAME of Mundy OR Johns.
  1449.           
  1450.           Criteria: MARRIED .OR. LASTNAME="Johns  "
  1451.           English:  Find all entries where person is married or LASTNAME
  1452.                     is equal to Johns.
  1453.           Selected: Records 1 and 2.
  1454.           Comments: When expressions are joined by .OR. then if either
  1455.                     expression is true, the record qualifies.  Thus, record
  1456.                     1 qualified because the MARRIED field is True and
  1457.                     record 2 qualified because of the LASTNAME match.
  1458.           
  1459.           Criteria: .NOT. MARRIED .AND. ENTRYDT>=CTOD("10/31/86")
  1460.           English:  Find all the unmarried people with an entry date of at
  1461.                     least October 31, 1986.
  1462.           Selected: Records 2 and 3.
  1463.           Comments: The connecter is .AND. so both expressions must be
  1464.                     true. Since the MARRIED field is false in both record
  1465.                     2 and 3 and since the ENTRYDT is at least 10/31/86,
  1466.                     they both would be output.  Note that the VALUE type
  1467.                     must match the field type with the DATE field.  There
  1468.                     is no direct way to enter a date in dBASE.  Thus, you
  1469.                     must enter the character string "10/31/86" and then
  1470.  
  1471.  
  1472.  
  1473.                                        - 20 -
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.                     convert it to a DATE with the character-to-date
  1481.                     function: CTOD().
  1482.           
  1483.           Criteria: ENTRYDT>=CTOD("10/01/86").AND.ENTRYDT<=CTOD("10/31/86")
  1484.           English:  Find all of the October, 1986 entries.
  1485.           Selected: Records 1 and 2.
  1486.           Comments: Here we are using a range of dates to select a month's
  1487.                     worth of entries.  Note that spacing between text is
  1488.                     optional.  Both expressions must be true for a match.
  1489.                     DATE fields must have DATE values.  CTOD() does it.
  1490.           
  1491.           Criteria: "This is a test"$COMMENTS
  1492.           English:  Find every record in which the text "This is a test"
  1493.                     appears in the COMMENTS memo field.
  1494.           Selected: Don't know.  See below.
  1495.           Comments: The $ operator is one of Boolean logic's most powerful
  1496.                     tools since it automatically searches TEXT STRINGS for
  1497.                     a match anywhere in the string.  It can be especially
  1498.                     helpful for use with fields in which a word may appear
  1499.                     at any place in a lengthy string of text.  For purposes
  1500.                     of searches, MEMO fields are treated by WAMPUM as text
  1501.                     strings.  Thus, you can search ANY memo field with the
  1502.                     logic outlined above.  To negate the expression, i.e.
  1503.                     "This is a test" is NOT contained in the MEMO field,
  1504.                     the correct syntax is .NOT."This is a test"$COMMENTS.
  1505.                     In this case, we didn't specify the contents of the 
  1506.                     MEMO field in developing the example.  Thus, there is
  1507.                     no way to tell if the text was found or not.
  1508.           
  1509.                                  WAMPUM'S SELECT ASSIST
  1510.           
  1511.                For those experiencing problems in mastering dBASE Boolean
  1512.           syntax but who have mastered Boolean selection theory, WAMPUM
  1513.           provides a helping hand: SELECT ASSIST.  By entering an asterisk
  1514.           (*) as the first character in the Record Selection field or
  1515.           whenever you pick the LIST FILE CONTENTS option when no selection
  1516.           criteria are in effect, SELECT ASSIST springs in to action.  
  1517.           
  1518.                SELECT ASSIST is a menu-driven record selection tool similar
  1519.           to that found in many data base systems such as dBASE III Plus. 
  1520.           It permits a user to enter up to 10 record selection criteria
  1521.           using a 4-step menu process.  As indicated earlier, it cannot
  1522.           replace the human brain in figuring out which records you want to
  1523.           work with, but it can help you master dBASE selection syntax.
  1524.           
  1525.                                    FIELDNAME SELECTION
  1526.           
  1527.                Once SELECT ASSIST is started, it will display a screen with
  1528.           the name of the first field in the active data base.  Step 1 is
  1529.           to identify the field involved in making your selection of
  1530.           records.  If you don't remember the field names in the data base,
  1531.           simply press the <Dn> and <Up> cursor keys to "thumb through" the
  1532.           field names.  When you find the one you want, press <ENTER>.  
  1533.           
  1534.  
  1535.  
  1536.  
  1537.  
  1538.  
  1539.                                        - 21 -
  1540.  
  1541.  
  1542.  
  1543.  
  1544.  
  1545.  
  1546.                If you already know the field name and there are a lot of
  1547.           them in your database, you may find it more convenient just to
  1548.           type several of the beginning characters of the field name. 
  1549.           SELECT ASSIST will begin searching for a matching field name as
  1550.           soon as you type a letter between A and Z.  If it finds no match,
  1551.           it will beep and redisplay the first field name in the data base.
  1552.           Since several fields obviously can have the same beginning
  1553.           letters, you may have to type several letters of the field name
  1554.           for SELECT ASSIST to find the field you're looking for.  Once the
  1555.           field name appears that you want, press <ENTER> to continue.
  1556.           
  1557.                It should be noted that once you have pressed <ENTER>, it is
  1558.           too late to change your mind about any previous selection you
  1559.           have made.  If you have made a mistake, your only option is to
  1560.           start over by pressing <ESC>ape to exit.  HINT: Be sure of your
  1561.           choice before you press the <ENTER> key!  If you do ESCape from
  1562.           SELECT ASSIST, you also will need to ESCape from the LIST FIELDS
  1563.           screen if you picked LIST FILE CONTENTS.  Otherwise, your list
  1564.           will include data on all records in your data base.
  1565.           
  1566.                               RELATIONAL OPERATOR SELECTION
  1567.           
  1568.                After selecting a field name, you then must choose a
  1569.           RELATIONAL OPERATOR telling WAMPUM what sort of comparison you
  1570.           wish to make against this field.  The default is EQUALS.  You may
  1571.           "thumb through" the choices by pressing the <Dn> or <Up> cursor
  1572.           keys.  Depending upon the field type of the field name specified,
  1573.           the relational operator selections will vary.  Display the
  1574.           operator desired, then press <ENTER> to proceed.
  1575.           
  1576.                                    VALUE SPECIFICATION
  1577.           
  1578.                Once you have specified the relational operator, you next
  1579.           must tell SELECT ASSIST what VALUE for this field you want to
  1580.           find.  Again, depending upon the field type, your options in
  1581.           specifying a value may be limited.  For example, if the field is
  1582.           a date field, the VALUE must also be a date.  With a logical
  1583.           field, there is no value specification.  Character fields require
  1584.           the entry of text without surrounding quotation marks.  Press the
  1585.           <ENTER> key once you have specified the value desired.
  1586.           
  1587.           
  1588.           
  1589.                                    CONNECTOR SELECTION
  1590.           
  1591.                Connector selection allows you to indicate how this
  1592.           selection should be linked to the next selection, if any.  The
  1593.           choices are listed by using the <Dn> and <Up> cursor keys. You
  1594.           may choose AND, OR, or NO CONNECTOR.  If you choose NO CONNEC-
  1595.           TOR, SELECT ASSIST assumes you are finished.  Specifying either
  1596.           of the other choices by pressing <ENTER> takes you to the next
  1597.           line to enter a second selection criteria beginning with another
  1598.           field name.  
  1599.           
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.                                        - 22 -
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.                Once you have entered all of the selection criteria desired,
  1613.           press the <PgDn> key in the CONNECTOR SELECTION field to tell
  1614.           SELECT ASSIST you are finished.  You may also specify NO CONNEC-
  1615.           TOR and press <ENTER> which has the same effect.  If you
  1616.           accidentally press <ENTER> to move to the next line with a
  1617.           connector of AND or OR, you may still end processing of SELECT
  1618.           ASSIST by pressing the <PgDn> key in the FIELD NAME position.  In
  1619.           this case, SELECT ASSIST assumes you wanted to use only those
  1620.           selection criteria on the lines above the current line.
  1621.           
  1622.           
  1623.           2.9.3  Listing File Contents
  1624.           
  1625.                Many times there is a need to produce a "quick and dirty"
  1626.           report which lists certain fields of information on a certain
  1627.           group of records in the data base.  The List File Contents option
  1628.           in conjunction with a previously specified Record Selection
  1629.           Criteria satisfies this need by simulating the dBASE LIST
  1630.           command.  
  1631.           
  1632.                If the List File Contents option is marked True, WAMPUM
  1633.           first will display the SELECT ASSISTANT previously described if
  1634.           no record selection criteria are in effect.  After specifying
  1635.           record selection criteria, WAMPUM then will display a screen
  1636.           asking the user to identify the fields to be listed.  The user
  1637.           should type a number between 1 and 9 beside each field which
  1638.           should be listed.  No number can be used twice!  If a MEMO field
  1639.           is to be included in the listing, it should be the field with
  1640.           either the highest or lowest number to assure that it prints in
  1641.           either the far right column or the far left column of the
  1642.           listing.  
  1643.           
  1644.                Pressing <PgDn> moves the user to a screen which prompts for
  1645.           (1) whether to print the listing, (2) whether to output all
  1646.           records (i.e., override record selection criteria then in
  1647.           effect), and (3) whether to output records marked for deletion. 
  1648.           When these prompts are answered, WAMPUM will produce the list
  1649.           with field headings either on the screen or on the printer.  If
  1650.           the total width of the fields specified for the listing exceeds
  1651.           the screen width or current printer width, the listing will be
  1652.           wrapped to the next line.  At the end of the listing will be a
  1653.           summary of the record selection criteria then in effect.
  1654.           
  1655.           
  1656.           2.9.4  Changing Current Data Entry Menu
  1657.           
  1658.                In addition to its standard data entry menu, WAMPUM provides
  1659.           the capacity for creating up to 9 customized data entry menus to
  1660.           match different data entry stages for any given application.  The
  1661.           number of menus available to the end-user are specified by the
  1662.           developer in creating an application.
  1663.           
  1664.                You may change data entry menus at any time by following
  1665.           these simple steps.  Access the S - Select Utilities screen from
  1666.           the Main System Menu.  Change the Change Current Menu field to T
  1667.           and press <PgDn>.  A listing of the available menus will be
  1668.  
  1669.  
  1670.  
  1671.                                        - 23 -
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.           displayed.  Simply type the number corresponding to the menu you
  1679.           want to use.  You then will be returned to the Main System Menu. 
  1680.           Until you change menus again, this new data entry menu will
  1681.           appear whenever you Add, Edit, or Display Records.
  1682.           
  1683.           
  1684.           2.9.5  Picking the Lead Index
  1685.           
  1686.                Files can only be accessed and output can only be produced
  1687.           in the order of one index at a time even though WAMPUM
  1688.           automatically updates up to 7indexes as you add and modify
  1689.           entries in the file.  
  1690.           
  1691.                The LEAD INDEX is always the FIRST index displayed at the
  1692.           bottom of the WAMPUM Main System Menu.  If you want to retrieve
  1693.           records in some order other than what the current LEAD INDEX
  1694.           would provide, then you can change the LEAD INDEX.
  1695.           
  1696.                Similarly, all output from WAMPUM including REPORTS, LABELS,
  1697.           and FORM LETTERS is produced in the order of the LEAD INDEX.  If
  1698.           you want the output ordered differently, then you must change the
  1699.           LEAD INDEX before generating the report, labels, or form letters
  1700.           unless you are using the W - WAMPUM PreFormat option. 
  1701.           
  1702.                To change the LEAD INDEX, select the S - Select Utilities
  1703.           option from the Main System Menu by typing an S or highlighting
  1704.           the option and pressing the <ENTER> key.  Enter any selection
  1705.           criteria desired then press <ENTER> to move to the field which
  1706.           asks Change Lead Index.  Change the value of the field from False
  1707.           to True by typing either a T or Y.  Assuming you have more than
  1708.           one index in use, a list of available indexes then will be
  1709.           displayed.  Just enter the number of the one which you want to
  1710.           designate as the LEAD INDEX.
  1711.           
  1712.                Always remember to check the LEAD INDEX before producing
  1713.           output from your file to assure that it is set as you desire.
  1714.           
  1715.           
  1716.           2.9.6  Setting Browse Mode ON
  1717.           
  1718.                WAMPUM implements dBASE III's powerful BROWSE command in a
  1719.           slightly different way.  By setting BROWSE Mode ON by specifying
  1720.           T or Y to the prompt in the Select Utilities screen, WAMPUM uses
  1721.           a two-step process for EDITing, DISPLAYing, DELETing, and
  1722.           UNDELETing records.
  1723.           
  1724.                The user first will be prompted for the key field value to
  1725.           find.  Then, instead of the usual data entry display, the user
  1726.           first will be presented with a table of the first twenty records
  1727.           in key order beginning with the first matching key value.  WAMPUM
  1728.           displays as many fields from the data base for each record as
  1729.           will fit on a single line of the screen.
  1730.           
  1731.                Within this display, the user can move UP and DOWN through
  1732.           the records with the UP and DOWN cursor keys.  The user can
  1733.           request the next twenty records beginning with the last record
  1734.  
  1735.  
  1736.  
  1737.                                        - 24 -
  1738.  
  1739.  
  1740.  
  1741.  
  1742.  
  1743.  
  1744.           currently displayed by pressing the <PgDn> key.  Browse also
  1745.           permits the user to move UP a single record by pressing <PgUp>. 
  1746.           If the record is found for which you are searching, then simply
  1747.           highlight that option and press the <ENTER> key.  This then
  1748.           triggers the usual WAMPUM data entry screen.  If no record is
  1749.           found for which you desire to move to the full data entry screen,
  1750.           then two choices are available.  Pressing <ESC> will ABORT the
  1751.           BROWSE session and return you to the Main System Menu.  Pressing
  1752.           the <SPACE BAR> or any other key not previously mentioned will
  1753.           allow you to enter a new record key value and commence another
  1754.           search.
  1755.           
  1756.                BROWSE mode is particularly useful in situations in which
  1757.           there may be multiple entries with a similar key value, i.e. a
  1758.           number of entries with a LASTNAME of Smith.  BROWSE permits you
  1759.           to examine the partial contents of 20 records at a time in order
  1760.           to identify the exact record with which to work.  Note that you
  1761.           cannot actually change any data while in the BROWSE mode.  You
  1762.           must move to the actual data entry screen to do this.
  1763.           
  1764.                If a record has been marked for deletion, that entry will
  1765.           show an asterisk (*) as the first character of the line. 
  1766.           Otherwise, the first character position is always blank.
  1767.           
  1768.                Once the full data entry mode has been triggered by pressing
  1769.           the <ENTER> key, the user still has the ability to move through
  1770.           the data base with either <PgDn> or <PgUp>.  At this juncture, it
  1771.           is necessary to return to the Main System Menu before the BROWSE
  1772.           mode is reinitiated.
  1773.           
  1774.           
  1775.           2.9.7  Listing the File Structure
  1776.           
  1777.                Particularly in developing reports, labels, and form
  1778.           letters, it is helpful to have a listing of the structure of the
  1779.           data base file in use.  The last option on the Select Utilities
  1780.           screen permits a user to request this listing.  If the prompt is
  1781.           answered with Y or T, then WAMPUM will ask whether you want the
  1782.           listing printed as opposed to displayed.  Typing T or Y at the
  1783.           Printed? option will provide a printed listing.  Pressing <ESC>
  1784.           will abort the listing entirely.  Pressing <PgDn> or <ENTER> will
  1785.           display the file structure on the screen.
  1786.                     
  1787.           
  1788.           
  1789.           2.10  R - REPORTS Generation
  1790.           
  1791.                The R - Reports option allows you to run existing dBASE III
  1792.           report formats and create new ones.  Creation of new reports is
  1793.           covered in the Developer's section of this User's Guide.
  1794.           
  1795.                Before selecting the Reports option, you already should have
  1796.           used the Select Utilities option to enter Record Selection
  1797.           Criteria and to specify the Lead Index for report output.  If you
  1798.           did not do so, simply press <ESC>ape to return to the Main Menu.
  1799.           
  1800.  
  1801.  
  1802.  
  1803.                                        - 25 -
  1804.  
  1805.  
  1806.  
  1807.  
  1808.  
  1809.  
  1810.                When you select the Reports option, a listing of report
  1811.           forms in the default directory will be displayed.  You then are
  1812.           prompted to enter the name of the report form you wish to run. 
  1813.           Type in the file name EXACTLY as it appears in the directory
  1814.           listing.  Do NOT include the .FRM file extension.
  1815.           
  1816.                There also is a field which allows you to specify the
  1817.           PRINTER FONT to be used if the report is to be printed.  If a
  1818.           report is to be printed on regular 8-1/2 x 11 inch paper using 10
  1819.           pitch type, then NO font number needs to be entered.  If your
  1820.           printer supports smaller fonts thereby enabling production of
  1821.           wider reports or reports turned sideways, enter a number
  1822.           corresponding to the font desired.  See the # - Printer Config
  1823.           section of the Developer's section of this User's Guide for more
  1824.           information.
  1825.           
  1826.                Once you have entered a font or pressed the <ENTER> key, the
  1827.           Printer Selection Screen will appear.  It permits you to specify
  1828.           (1) whether to Print or Display the Report, (2) whether to
  1829.           override the Record Selection Criteria and output ALL records,
  1830.           and (3) whether to output records marked for deletion which
  1831.           typically are not output. See the Printer Selection Screen
  1832.           section of this User's Guide for more information on these
  1833.           options.
  1834.           
  1835.           
  1836.           2.11  L - LABELS Production
  1837.           
  1838.                The L - Labels option allows you to run existing dBASE III
  1839.           label formats and create new ones.  Creation of new labels is
  1840.           covered in the Developer's section of this User's Guide.
  1841.           
  1842.                Before selecting the Labels option, you already should have
  1843.           used the Select Utilities option to enter Record Selection
  1844.           Criteria and to specify the Lead Index for label output.  If you
  1845.           did not do so, simply press <ESC>ape to return to the Main Menu.
  1846.           
  1847.                When you select the Labels option, a listing of label forms
  1848.           in the default directory will be displayed.  You then are
  1849.           prompted to enter the name of the label form you wish to run. 
  1850.           Type in the file name EXACTLY as it appears in the directory
  1851.           listing.  Do NOT include the .LBL file extension.
  1852.           
  1853.                There also is a field which allows you to specify the
  1854.           PRINTER FONT to be used if the labels are to be printed.  If the
  1855.           labels are to be printed using standard 10 pitch type, then NO
  1856.           font number needs to be entered.  If you will be producing labels
  1857.           on a laser printer, then FONT 7 should be selected.  See the # -
  1858.           Printer Config section of the Developer's section of this User's
  1859.           Guide for more information.
  1860.           
  1861.                Once you have entered a font or pressed the <ENTER> key, the
  1862.           Printer Selection Screen will appear.  It permits you to specify
  1863.           whether to Print or Display the Labels, whether to override the
  1864.           Record Selection Criteria and output ALL records, and whether to
  1865.  
  1866.  
  1867.  
  1868.  
  1869.                                        - 26 -
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.           output labels for records marked for deletion. These typically
  1877.           are not output. See the Printer Selection Screen section of this
  1878.           User's Guide for more information on these options.
  1879.           
  1880.           
  1881.           2.12  T - FORM LETTER Generation
  1882.           
  1883.                The T - Form Letters option allows you to run existing
  1884.           WAMPUM form letters and create new ones.  Creation of new form
  1885.           letters is covered in the Developer's section of this User's
  1886.           Guide.
  1887.           
  1888.                Before selecting the Form Letters option, you already should
  1889.           have used the Select Utilities option to enter Record Selection
  1890.           Criteria and to specify the Lead Index for form letter output. 
  1891.           If you did not do so, simply press <ESC>ape to return to the Main
  1892.           Menu. The one exception to this is where you wish to generate a
  1893.           form letter using an indexed key to find a single record.  In
  1894.           this case, make certain that no Record Selection Criteria are in
  1895.           effect.  Then select the T - Form Letters option.  After
  1896.           selecting a form letter file as outlined below, you will be
  1897.           prompted to enter the key value to find using the primary index
  1898.           then in effect.
  1899.           
  1900.                When you select the Form Letters option, a listing of form
  1901.           letter files in the default directory will be displayed.  Note
  1902.           that a form letter file is a standard .DBF file except that its
  1903.           file name begins with T-.  You then are prompted to enter the
  1904.           name of the form letter form you wish to run.  Type in the file
  1905.           name EXACTLY as it appears in the directory listing.  Do NOT
  1906.           include the .DBF file extension.
  1907.           
  1908.                There also is a field which allows you to specify the
  1909.           PRINTER FONT to be used if the form letters are to be printed. 
  1910.           If the form letters are to be printed using standard 10 pitch
  1911.           type, then NO font number needs to be entered.  See the # -
  1912.           Printer Config section of the Developer's section of this User's
  1913.           Guide for more information.
  1914.           
  1915.                Once you have entered a font or pressed the <ENTER> key, the
  1916.           Printer Selection Screen will appear unless there are no record
  1917.           selection criteria in effect.  In the latter case, you will be
  1918.           prompted to enter the record key to find using the lead index
  1919.           then in effect.  When the printer screen displays, it permits you
  1920.           to specify whether to Print or Display the Form Letters, whether
  1921.           to override the Record Selection Criteria and output ALL records,
  1922.           and whether to output form letters for records marked for
  1923.           deletion. These typically are not output. See the Printer
  1924.           Selection Screen section of this User's Guide for more
  1925.           information on these options.
  1926.           
  1927.           
  1928.  
  1929.  
  1930.  
  1931.  
  1932.  
  1933.  
  1934.  
  1935.                                        - 27 -
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.           2.13  W - WAMPUM Preformatted Output
  1943.           
  1944.                The WAMPUM Preformatted Output option allows you to run up
  1945.           to 80 predefined Reports, Labels, and Form Letters each with
  1946.           predefined selection criteria, sort order, and even a related
  1947.           file for table lookup if desired.  This is perhaps WAMPUM's most
  1948.           powerful feature and is NOT available in dBASE III at all.
  1949.           
  1950.                Before this option is available, the WAMPUM master file must
  1951.           be created and appropriate entries must be made for the pre-
  1952.           defined output desired.  This is covered in the Developer's
  1953.           section of this User's Guide.
  1954.           
  1955.                Assuming that this already has been done, then all that is
  1956.           necessary to run WAMPUM Preformatted Output is to select the W -
  1957.           WAMPUM PreFormat option from the Main System Menu.  A two-column
  1958.           listing of reports, labels, and form letters available for
  1959.           automatic production then will be displayed.  Following the
  1960.           description of each item will be a single letter (R, L, or T)
  1961.           indicating whether the output is a Report, Label, or Form Letter.
  1962.           Mark the reports, labels, and form letters you wish to produce
  1963.           with a T or Y in the logical field provided to indicate which
  1964.           should be run.
  1965.           
  1966.                You will notice at the bottom of the screen a range of dates
  1967.           is specified.  The default range of dates is the beginning and
  1968.           ending of the current month unless today's date is less than the
  1969.           6th of the month.  In this case, the default is the beginning and
  1970.           ending dates of last month.  Most folks produce monthly reports
  1971.           for a prior month at the beginning of the next month so WAMPUM
  1972.           saves you a little typing.
  1973.           
  1974.                The range of dates can be changed by you to any dates
  1975.           desired although the first date should always be less than or
  1976.           equal to the second date.  The range of dates are automatically
  1977.           used for any preformatted reports, labels, or form letters in
  1978.           which the developer wanted the end-user to have the flexibility
  1979.           to select the time period for the report at the time it was
  1980.           produced.  
  1981.           
  1982.                For instance, using the data base example outlined earlier
  1983.           to show how to select records, let us suppose that the developer
  1984.           had predefined a report which would output certain information
  1985.           about new entries covering a period of entry dates.  If that
  1986.           report were run as a WAMPUM Preformatted Report, you then could
  1987.           specify the range of entry dates at run time rather than the
  1988.           developer constantly having to update the master record.  This
  1989.           also frees you from having to master Boolean logic overnight!
  1990.           
  1991.                The only rule to remember is that the DATE RANGE specified
  1992.           applies to ALL output produced during a single run.  Thus, if you
  1993.           had two preformatted reports for which you wanted different date
  1994.           ranges on output, then you would have to run one report with one
  1995.           date range.  Then select the WAMPUM Preformatted option again,
  1996.           change the date range, and run the other report.
  1997.           
  1998.  
  1999.  
  2000.  
  2001.                                        - 28 -
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.                Once you have entered your choices, the Printer Selection
  2009.           Screen will appear.  It permits you to specify (1) whether to
  2010.           Print or Display the output, (2) whether to override the Record
  2011.           Selection Criteria and output ALL records, and (3) whether to
  2012.           generate output for records marked for deletion. These typically
  2013.           are not output. See the Printer Selection Screen section of this
  2014.           User's Guide for more information on these options.
  2015.           
  2016.           
  2017.           2.14  Printer Selection Screen
  2018.           
  2019.           2.14.1  Printed Output
  2020.           
  2021.                Whenever you run a Report, Label, Form Letter, or WAMPUM
  2022.           Preformatted Output, you will see the Printer Selection Screen
  2023.           which lets you choose whether to PRINT or DISPLAY the
  2024.           information.
  2025.           
  2026.                If you want the OUTPUT printed, type a T or Y at the prompt.
  2027.           
  2028.           
  2029.           2.14.2  Output All Records
  2030.           
  2031.                If record selection criteria are in effect, you also will be
  2032.           asked whether you want to override those criteria and OUTPUT
  2033.           information on ALL records in the data base.
  2034.           
  2035.                If you DO want to OVERRIDE the record selection criteria in
  2036.           effect, then change the default entry to T or Y.
  2037.           
  2038.           
  2039.           2.14.3  Output Records Marked for Deletion
  2040.           
  2041.                You also will be asked whether to output information on
  2042.           records marked for DELETION.  The default is No.
  2043.           
  2044.                If you want DELETED records included in your output, change
  2045.           the entry to T or Y.
  2046.           
  2047.           
  2048.           2.15  On-Line HELP
  2049.           
  2050.                The best way to learn WAMPUM is to read this User's Guide
  2051.           cover to cover.  Most folks won't do that so WAMPUM provides some
  2052.           of what is contained in the User's Guide in HELP screens keyed to
  2053.           where you are in the program.
  2054.           
  2055.                To access the HELP screens, press the F1 function key at any
  2056.           time.  Depending upon where you are in WAMPUM, a screen of HELP
  2057.           will be displayed.  Simply press the <ENTER> key to return to
  2058.           where you were.
  2059.           
  2060.                Every choice from the WAMPUM Main System Menu has an
  2061.           intermediate screen which gives you a chance to change your
  2062.           mind.  It is on this second screen after picking any option that
  2063.  
  2064.  
  2065.  
  2066.  
  2067.                                        - 29 -
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.           the most detailed HELP is available.  Once you have read the HELP
  2075.           message and returned to where you were, you can return to the
  2076.           Main System Menu simply by pressing the <ESC>ape key.
  2077.           
  2078.                In short, you can get HELP on any WAMPUM topic without
  2079.           actually having to complete execution of that particular
  2080.           function.
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130.  
  2131.  
  2132.  
  2133.                                        - 30 -
  2134.  
  2135.  
  2136.  
  2137.  
  2138.  
  2139.  
  2140.           3  Developer Functions
  2141.           
  2142.           3.1   Creating A New Application
  2143.           
  2144.           3.1.1   Overview of Application Development Strategy
  2145.           
  2146.                As with any application development, the best advice in
  2147.           starting a new project is TURN OFF THE COMPUTER and use your head
  2148.           for a while to figure out what you want to do.  What data input
  2149.           will you need to capture to get the output desired?
  2150.           
  2151.                Once you know what you want, then some familiarity with
  2152.           WAMPUM's structure will help.  WAMPUM is designed to be stored in
  2153.           a directory from which it can be run regardless of the active
  2154.           default directory on your hard disk.  This means it should be in
  2155.           a directory supported by the current DOS PATH.
  2156.           
  2157.                The cardinal rule in using WAMPUM is a simple one: separate
  2158.           applications should be created in separate subdirectories which
  2159.           are NOT in the DOS PATH.  There are two reasons for this. First,
  2160.           WAMPUM creates a number of supporting files for each application.
  2161.           If you create more than one application in a given subdirectory
  2162.           then these supporting files will not be available for use in both
  2163.           applications.  Second, the reason for not building applications
  2164.           in a directory that is part of the DOS PATH is because WAMPUM
  2165.           accesses files on the hard disk using the same PATH command that
  2166.           DOS uses. If you build an application in a directory which is
  2167.           part of the PATH, then WAMPUM's supporting files may
  2168.           unintentionally spill over into other WAMPUM applications as you
  2169.           begin building them.
  2170.           
  2171.                Each WAMPUM application typically will include a main file,
  2172.           perhaps a related file, several indexes, and numerous reports,
  2173.           labels, and forms.  In addition, each time you run WAMPUM in a
  2174.           new directory, it automatically builds some supporting files for
  2175.           that application.  These include EDIT.DBF (which is used to store
  2176.           the edit checks for a particular application), KEYS.DBF (which is
  2177.           used to store any keyboard macros for a particular application),
  2178.           MENUS.DBF (which is used to store up to 9 data entry screen
  2179.           formats) and, if requested, WAMPUM.DBF (which is used to build a
  2180.           library of preformatted reports, labels, and form letters which
  2181.           can be run without users having to master Boolean logic and
  2182.           sorting rules).  For the same reason stressed above, you should
  2183.           not run WAMPUM in a directory which is part of the DOS PATH for
  2184.           it will build these supplemental files which may then inadver-
  2185.           tently spill over into other applications on the hard disk!
  2186.           
  2187.                You may be wondering why anyone would want a DOS PATH if it
  2188.           causes all these problems.  The answer is that the DOS PATH gives
  2189.           WAMPUM the capability to share data stored in other directories
  2190.           without having a duplicate copy in the current directory. For
  2191.           example, the printer configuration files can be stored in the
  2192.           same directory as WAMPUM yet they may be used from any directory.
  2193.           Similarly, in certain situations with very large data bases which
  2194.           must be shared by several applications, it may be desirable to
  2195.           move the shared data base itself into a directory which is part
  2196.  
  2197.  
  2198.  
  2199.                                        - 31 -
  2200.  
  2201.  
  2202.  
  2203.  
  2204.  
  2205.  
  2206.           of the DOS PATH so that it can be used in multiple applications
  2207.           without having to duplicate the data.   These are considerations
  2208.           you would want to think through while the computer is turned OFF!
  2209.           
  2210.                What follows in the subsequent sections is the STEP-by-STEP
  2211.           process for building a new WAMPUM application.  In order to
  2212.           simplify the presentation, it helps to use a sample application.
  2213.           We will assume that the application to be built is based upon the
  2214.           data base outlined previously.  The structure of that file is
  2215.           repeated here for the sake of clarity:
  2216.           
  2217.                FIELD NAME     FIELD TYPE     FIELD LEN      FIELD DEC
  2218.           
  2219.                LASTNAME           C             20              0
  2220.                ACCTNO             N              5              0
  2221.                ENTRYDT            D              8              0
  2222.                MARRIED            L              1              0
  2223.                COMMENTS           M             10              0
  2224.           
  2225.           
  2226.           3.1.2   Create A New SubDirectory
  2227.           
  2228.                The first step in building a new WAMPUM application is to
  2229.           create a new subdirectory on the disk to house the information.
  2230.           You must be at the DOS prompt to perform these steps.  
  2231.           
  2232.                We recommend you name the subdirectory using a single word
  2233.           of up to 8 characters in length with no embedded spaces or
  2234.           punctuation.  To keep things simple, let's name it SAMPLE here.
  2235.           If you want to follow along, type the following commands. Press
  2236.           the <ENTER> key after typing each command.
  2237.           
  2238.                               PROMPT $P$G
  2239.                               CD \ 
  2240.                               MD SAMPLE
  2241.                               CD \SAMPLE
  2242.           
  2243.                The commands above (1) change the DOS prompt to assure that
  2244.           you'll know the subdirectory in which you are working, (2) move
  2245.           you to the "root" (top) directory, (3) make a new directory named
  2246.           "SAMPLE", and (4) move you to the new "SAMPLE" directory.  If you
  2247.           are working on the C: drive, the prompt on your screen after
  2248.           issuing the above commands should be C:\SAMPLE>.
  2249.           
  2250.                You now are ready to start up WAMPUM.  Since you are
  2251.           building a new application, you will want to use DEVELOPER MODE.
  2252.           This means you need to include the developer password as shown
  2253.           below.  Unless you need to force WAMPUM into monochrome mode,
  2254.           type the following command and press the <ENTER> key:
  2255.           
  2256.                               WAMPUM VOODOO
  2257.           
  2258.                If you have a Compaq or some other clone that reports a
  2259.           color card when you are using a monochrome display, then type:
  2260.           
  2261.                               WAMPUM VOODOO MONO
  2262.  
  2263.  
  2264.  
  2265.                                        - 32 -
  2266.  
  2267.  
  2268.  
  2269.  
  2270.  
  2271.  
  2272.           3.1.3   Building a New File
  2273.           
  2274.                The first piece of the new application to build is the main
  2275.           data file.  This may contain up to 400 fields depending upon the
  2276.           amount of free memory in your computer. Be aware that you will
  2277.           forfeit dBASE III compatibility when you create more than 128.
  2278.           
  2279.                Select the B - Build New File option from the Main System
  2280.           Menu by typing a B or highlight the option and press <ENTER>. You
  2281.           then will be prompted to enter a file name for your new data base
  2282.           file.  The file name must comply with DOS requirements for file
  2283.           names, i.e. up to 8 characters, no spaces, and no punctuation.
  2284.           Think of a file name that bears some relationship to the
  2285.           application.  It makes things easier.  For our sample, let's use
  2286.           ACCOUNTS.  Type in the file name and press <ENTER>.  Note that
  2287.           you do NOT enter the file extension which WAMPUM assigns as .DBF.
  2288.           
  2289.                You then will be prompted to enter four pieces of infor-
  2290.           mation for each new field in your data base: a FIELD NAME, a
  2291.           FIELD TYPE, a FIELD LENGTH, and FIELD DECIMALS, if any. 
  2292.           
  2293.                In determining the order of the fields in the data base
  2294.           being created, keep in mind that BROWSE mode, which was discussed
  2295.           previously under the Select Utilities option, displays a single
  2296.           line of fields for about 20 records at a time.  If your users
  2297.           will be using BROWSE mode, then you should select the most
  2298.           important fields in the data base as the first fields in the
  2299.           file.  This will assure that they are displayed when the user
  2300.           sets BROWSE mode ON.  The actual number of fields which will fit
  2301.           on a single line of the screen is determined by two factors: the
  2302.           length of the field names used and the maximum length of the
  2303.           field data.  Adding these lengths together plus a space between
  2304.           each field, WAMPUM will display as many fields as will fit within
  2305.           79 characters in BROWSE mode.  The first character position of
  2306.           the line is reserved to display whether a record has been marked
  2307.           DELETED.
  2308.           
  2309.                Field names should bear some resemblance to the piece of
  2310.           data which will be stored in the field.  dBASE III supports 10
  2311.           character field names, and WAMPUM can use them, too.  However,
  2312.           applications are much more straight-forward if field names are
  2313.           limited to 8 characters or less since this length matches the DOS
  2314.           filename length restriction.  
  2315.           
  2316.                Field types and lengths supported by WAMPUM include:
  2317.           
  2318.           Field Type     Abbrev    Min.Len.  Max.Len.  Comments            
  2319.            
  2320.           Character        C          1        254     Any text string
  2321.           Numeric          N          1         15     Numeric for math
  2322.           Date             D          8          8     Any date info
  2323.           Logical          L          1          1     True/False info
  2324.           Memo             M         10         10     Free-form WP text
  2325.           
  2326.           
  2327.  
  2328.  
  2329.  
  2330.  
  2331.                                        - 33 -
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.                Field decimals will always be 0 except for numeric fields in
  2339.           which you want to use real numbers, i.e. those with decimals. 
  2340.           Remember that with such fields, the TOTAL length is the maximim
  2341.           number of integer positions, plus 1 for the decimal, plus the
  2342.           number of decimal positions.  Thus, if the largest value to be
  2343.           entered in a numeric field is 999.99, the field length is 6 and
  2344.           decimals is 2.
  2345.           
  2346.                Enter the information for the fields outlined in our sample.
  2347.           After entering all of the fields, a new blank record will
  2348.           appear.  Press the <ESC>ape key to indicate that you are
  2349.           finished.
  2350.           
  2351.           
  2352.           3.1.4   Selecting the New File
  2353.           
  2354.                Once the data base structure has been created, you are ready
  2355.           to tell WAMPUM which file you will be working with.  From the
  2356.           Main System Menu select the F - File Select option to place the
  2357.           file in use.
  2358.           
  2359.                When you pick this option, you will be prompted for the name
  2360.           of the file to use.  If you forget the name of the file, just
  2361.           press the <ENTER> key and a list of .DBF files in the current
  2362.           directory will be displayed.  Press <ENTER> to return to the file
  2363.           name prompt.  Type ACCOUNTS as the name of the new file and press
  2364.           <ENTER> to redisplay the Main System Menu.
  2365.           
  2366.                The bottom of the Main System Menu now should show the file
  2367.           in use with a notation: FILE: ACCOUNTS.
  2368.           
  2369.           
  2370.           3.1.5   Revising the Existing File Structure
  2371.           
  2372.                Beginning with version 3.1, WAMPUM provides a simple
  2373.           facility to revise the structure of an existing data base. This
  2374.           often becomes necessary when you design an initial data base
  2375.           without first turning the machines to spend some time thinking
  2376.           first.
  2377.           
  2378.                To revise the structure of an existing data base, you first
  2379.           must select that file for use with the F - File Select option.
  2380.           Once the file is in use, select the B - Build New File.  The
  2381.           prompt will advise you to insert an asterisk (*) for the file
  2382.           name if you desire to revise the existing data base structure.
  2383.           Type an asterisk and press <ENTER>.  WAMPUM will ask whether you
  2384.           really want to revise the structure of the data base. Type Y.
  2385.           
  2386.                WAMPUM will display up to two columns of fields from your
  2387.           data base.  For each field, you may change the field name, field
  2388.           type, field length, and field decimals.  You may also delete a
  2389.           field from the structure by marking the DELETE? option True.  If
  2390.           you change the name or field type of an existing field, ALL DATA
  2391.           which exists in that field throughout your data base will be
  2392.           destroyed!  If there are more than 40 fields in your data base
  2393.  
  2394.  
  2395.  
  2396.  
  2397.                                        - 34 -
  2398.  
  2399.  
  2400.  
  2401.  
  2402.  
  2403.  
  2404.           structure, you can move through them using the <PgDn> and <PgUp>
  2405.           keys.  Once you have made all the changes to existing fields
  2406.           desired, press the <ESC> key to proceed.
  2407.           
  2408.                WAMPUM then will ask whether you wish to ADD new fields to
  2409.           the existing data base.  If you need additional fields, type Y
  2410.           and you will be prompted for a field name, type, length, and
  2411.           decimals entry for each new field.  You also can use <PgUp> and
  2412.           <PgDn> to move through the existing fields.  Once you have added
  2413.           all of the new fields desired, press <ESC> to proceed.
  2414.           
  2415.                WAMPUM then gives you one last chance to avoid modifying the
  2416.           structure of your data base.  If you wish to proceed, type Y when
  2417.           prompted for whether to revise the data base structure.  Make
  2418.           certain that your hard disk has sufficient empty space to tempo-
  2419.           rarily house a duplicate of your data base (.DBF) and memo fields
  2420.           file (.DBT), if any.  Also make certain that you make a backup of
  2421.           your data base before revising the structure of the file.
  2422.           
  2423.                Once the data base has been revised, always reindex using
  2424.           the X - Rebuild/FileFix option.  If you are using edit checks,
  2425.           data entry menus, or keyboard macros which were keyed to the old
  2426.           file structure, make certain that these are revised to reflect
  2427.           the new data base structure before adding or editing data in the
  2428.           data base.
  2429.           
  2430.           
  2431.           3.1.6   Indexing the New File
  2432.           
  2433.           3.1.6.1  Overview
  2434.           
  2435.                WAMPUM indexes serve two functions in run-time applications.
  2436.           First, they provide a quick means of retrieving records for edit,
  2437.           display, or printing.  Typical retrieval times even with large
  2438.           data bases are less than one second.  Indexes also serve as the
  2439.           sorting tool for all output: reports, labels, and form letters.
  2440.           
  2441.                Thus, in building a new application, you need to take both
  2442.           of these considerations into account.  You will need indexes to
  2443.           retrieve your data quickly for updating.  And you may need other
  2444.           indexes to assure that reports, labels, and form letters are
  2445.           produced in the proper sorted order.
  2446.           
  2447.                The primary advantage in using indexes rather than a sort
  2448.           for output is that no physical sorting of the data base ever
  2449.           takes place since the indexes are constantly updated as new
  2450.           records are added and old ones are modified.  This saves an
  2451.           enormous amount of time in producing reports.
  2452.           
  2453.                WAMPUM 3.1 supports up to SEVEN indexes for any application.
  2454.           It should be noted that while these indexes function much like
  2455.           the indexes in dBASE III, they are not compatible.  Thus, if you
  2456.           are moving dBASE III applications over to use with WAMPUM, the
  2457.           data base, reports, and labels are compatible, but the indexes
  2458.           are not.  These can be rebuilt easily using the guidelines which
  2459.           follow.  WAMPUM indexes have a file extension of .NTX.
  2460.  
  2461.  
  2462.  
  2463.                                        - 35 -
  2464.  
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470.           
  2471.                Select the I - Index select/create option from the Main
  2472.           System Menu.  Notice that this option provides a developer with a
  2473.           means both to create new indexes and to use existing ones.  Both
  2474.           avenues are addressed in the next sections of this Guide.
  2475.           
  2476.           
  2477.           3.1.6.2  Creating New Indexes
  2478.           
  2479.                New indexes can be created in one of two ways depending upon
  2480.           the type of index desired.  WAMPUM can create an index of any
  2481.           character, numeric, or date field as it exists in the data base. 
  2482.           Or you can create a special index made up of a combination of
  2483.           fields in the data base using dBASE string manipulation
  2484.           functions.  For example, if your data base had fields for both a
  2485.           first name and a last name, you might want a single index which
  2486.           sorted the data base on last name and then first name within the
  2487.           last name.
  2488.           
  2489.                The simpler index which is simply a single field index is
  2490.           created by entering a single asterisk (*) in the space provided
  2491.           for the index name.  If you wish to create more than one index,
  2492.           enter a single * in the space provided for Index 1, Index 2, etc.
  2493.           When you have entered as many asterisks as desired, press <PgDn>
  2494.           to continue.  The screen will then clear, and a list of all the
  2495.           fields in your data base will appear.  Mark the name of ONE field
  2496.           you want to index with the letter T or Y.  Make certain that you
  2497.           mark only ONE field on the screen True. Then <PgDn> to continue. 
  2498.           If you indicated that you wished to create more than one index by
  2499.           putting an * in more than one of the Index spaces, then you will
  2500.           get another screen with the same field list.  Mark the next field
  2501.           you want to index with a T or Y, and <PgDn> again.  Continue this
  2502.           process until up to 7 indexes have been created.
  2503.           
  2504.                In our example, you probably would want to index two fields:
  2505.           the LASTNAME field and the ACCTNO field.  So you should place a
  2506.           single * in the first two Index spaces provided and <PgDn>.
  2507.           
  2508.                In some circumstances, a more complex index may be desired.
  2509.           If you know what you are doing (i.e. you really are a dBASE III
  2510.           programmer), you can build any type of index to achieve any type
  2511.           of sorting desired.  To build a more complex index, enter two
  2512.           asterisks (**) beside each Index entry provided and <PgDn>.  You
  2513.           then will be prompted to name the new index file and then to
  2514.           enter the index expression.  This expression can be ANY legal
  2515.           dBASE III string expression.  Note two differences with Clipper's
  2516.           indexes insofar as TRIMmed fields (those with the trailing spaces
  2517.           stripped off) are concerned.  If you are trimming spaces off
  2518.           character strings, they must be added as real spaces at the end
  2519.           of the expression.  Otherwise, the resultant index will be
  2520.           nothing but a null string.  Second, an index expression must have
  2521.           a constant fixed length. For example, if you wanted to index on
  2522.           lastname then comma space first name, the correct syntax is
  2523.           SUBSTR(TRIM(LASTNAME)+", "+FIRSTMI+SPACE(20),1,35). The SPACE(20)
  2524.           expression assumes the LASTNAME field is 20 characters in length.
  2525.           
  2526.  
  2527.  
  2528.  
  2529.                                        - 36 -
  2530.  
  2531.  
  2532.  
  2533.  
  2534.  
  2535.  
  2536.           3.1.6.3  Selecting Indexes
  2537.           
  2538.                Once you have built new indexes, they automatically are
  2539.           selected for use in the same order they were built.  You can
  2540.           change both the LEAD INDEX and the active indexes at any time by
  2541.           picking the I - Index select/create option and entering the
  2542.           number of the lead index or the names of the indexes desired.
  2543.           
  2544.                One caution is in order.  Remember that indexes are only
  2545.           UPDATED with ADD or EDIT if those indexes are in use at the time
  2546.           the file is changed!  You can ascertain which indexes are in use
  2547.           by looking at the INDX listing which appears below the Main
  2548.           System Menu.  If you built the indexes recommended in the last
  2549.           section, the last line of your screen should read as follows:
  2550.           
  2551.                     FILE: ACCOUNTS   INDX: LASTNAME,ACCTNO
  2552.           
  2553.           
  2554.           3.1.7   Printer Configuration (.MEM file)
  2555.           
  2556.           3.1.7.1  Overview
  2557.           
  2558.                In order to create high-quality output in reports, labels,
  2559.           and form letters, you will need to configure an application for a
  2560.           specific printer.  WAMPUM is packaged with several printer
  2561.           configuration tables which already have been built to support a
  2562.           number of popular printers.  If you're a lucky person, your work
  2563.           has already been done.  If not, read the section on constructing
  2564.           a new printer table below.
  2565.           
  2566.                WAMPUM is designed to allow a developer to imbed printer
  2567.           codes in reports, labels, and form letters to control the actual
  2568.           printing of text.  In addition, the end-user can specify the
  2569.           starting printer font to be used to output any report, label, or
  2570.           form letter.  Finally, WAMPUM preformatted output includes the
  2571.           option of specifying the initialization printer string. 
  2572.           
  2573.                What is a WAMPUM printer table?  It is a standard dBASE III
  2574.           memory variable file (.MEM file extension) with special codes
  2575.           that tell your printer to print in a certain mode.  The following
  2576.           field names are reserved by WAMPUM and should not be used as
  2577.           field names in your data bases.  These fields can be used in
  2578.           creating report forms, labels, and form letters to vary the type
  2579.           styles within those output documents.
  2580.           
  2581.                     FONTINIT       FONT1     FONT4     FONT7
  2582.                     FONTRESET      FONT2     FONT5     FONT8
  2583.                     FONT0          FONT3     FONT6     FONT9
  2584.           
  2585.                Note that the FONTINIT sequence always gets sent to the
  2586.           printer before anything is printed.  The FONTRESET sequence
  2587.           always gets sent after anything is printed.  If these fields are
  2588.           empty, then obviously nothing gets sent.
  2589.           
  2590.  
  2591.  
  2592.  
  2593.  
  2594.  
  2595.                                        - 37 -
  2596.  
  2597.  
  2598.  
  2599.  
  2600.  
  2601.  
  2602.                The default font for all output is FONT0.  This always gets
  2603.           sent after the FONTINIT sequence unless you specify some other
  2604.           number when the output is generated.
  2605.           
  2606.                Listed below is the definition logic used to develop the
  2607.           font codes for the HP Laserjet printers.  It is similar to what
  2608.           was used for the Epson printers, except all output is in portrait
  2609.           mode with Epson.  In general terms, FONT9 is reserved for very
  2610.           small print to accomodate reports wider than 132 columns. FONT8
  2611.           is reserved to accomodate reports from 81 to 132 columns wide.
  2612.           FONT7 is used with the lasers to get mailing labels to line up.
  2613.           
  2614.                     FONT0     10 pitch Courier, portrait mode
  2615.                     FONT1     10 pitch standard, portrait mode
  2616.                     FONT2     10 pitch bold, portrait mode
  2617.                     FONT3     10 pitch italics, portrait mode
  2618.                     FONT4     Proportional, big bold, portrait mode
  2619.                     FONT5     Proportional, baby print, portrait mode
  2620.                     FONT6     Standard, baby print, portrait mode
  2621.                     FONT7     10 pitch with codes suitable for LABELS
  2622.                     FONT8     10 pitch, standard, landscape mode
  2623.                     FONT9     Standard, baby print, landscape mode
  2624.           
  2625.                Obviously, use of these font codes can be adjusted as your
  2626.           application demands.  There may be instances in which you need
  2627.           underscoring.  This can be accomplished using one font to turn on
  2628.           automatic underscore and another to turn it off if your printer
  2629.           supports it.
  2630.           
  2631.                For those using LaserJet Plus or LaserJet II printers, you
  2632.           should be aware that these font codes also can be used to imbed a
  2633.           logo or signature block in a form.  Pricing for digitized logos
  2634.           is about $150 each while digitized signatures cost about $50. One
  2635.           source for these is Orbit Enterprises, P.O. Box 2875, Glen Ellyn,
  2636.           IL 60138.  The phone number is 312/469-3405.
  2637.           
  2638.           
  2639.           3.1.7.2  Selecting an Existing Printer Table
  2640.           
  2641.                To select an existing printer table for use, choose the
  2642.           option labeled # - PRINTER Config on the Main System Menu.  A
  2643.           listing of all .MEM files in the current directory will be
  2644.           displayed.  Enter the name of the printer table you wish to use
  2645.           without the .MEM file extension.  Note that you may use a table
  2646.           which is stored in another directory so long as that directory is
  2647.           part of DOS's PATH command and as long as you know the file name.
  2648.           
  2649.                Once you have selected a printer, the Main System Menu will
  2650.           reappear and the last line on the screen should now show the
  2651.           printer and FONT in use.  Assuming you selected the HPLASERA
  2652.           font, the last line of your screen should look like this:
  2653.           
  2654.                FILE: ACCOUNTS  INDX:LASTNAME,ACCTNO  PRT: HPLASERA/0
  2655.           
  2656.           
  2657.  
  2658.  
  2659.  
  2660.  
  2661.                                        - 38 -
  2662.  
  2663.  
  2664.  
  2665.  
  2666.  
  2667.  
  2668.           3.1.7.3  Creating a New Printer Table
  2669.           
  2670.                If there is no printer table already available for your non-
  2671.           standard printer, then you will need to build one.  It's easy! 
  2672.           First, select the # - PRINTER config option on the Main Menu.
  2673.           
  2674.                When WAMPUM prompts for the name of the printer table to
  2675.           use, type an asterisk (*) and press <ENTER>.  If entering a file
  2676.           name for your new printer template, you then will get a data
  2677.           entry screen in which to type the special codes for your
  2678.           printer.  You will need your printer manual to figure these out!
  2679.           
  2680.                First, decide what you want each of the printer fonts to
  2681.           do.  You also must determine what sort of initialization
  2682.           sequence, if any, you want to initiate whenever anything is
  2683.           printed.  And, you will want to decide whether to reset your
  2684.           printer after the printing is completed.  Almost every printer
  2685.           has some code sequence which resets the printer to its default
  2686.           settings just as if the printer had been switched off and on. 
  2687.           This is a good idea!  It always assures that your printer is
  2688.           configured in a standard way for the next job.  It's an equally
  2689.           good idea to execute this reset as part of the printer initiali-
  2690.           zation sequence.
  2691.           
  2692.                Most printer codes start with an <ESC>ape code which has the
  2693.           ASCII value of 27.  In a lot of printer manuals, it is referred
  2694.           to as CHR$(27) which is the way <ESC> is written in BASIC.  Any
  2695.           time you see a code written as above which cannot be typed using
  2696.           the standard typewriter keyboard, you can enter it in WAMPUM just
  2697.           as you would in LOTUS 1-2-3 or Symphony, i.e. \027 (a backslash
  2698.           followed by a three-digit number representing the ASCII code of
  2699.           the character desired: zero, two, seven).  For example, if your
  2700.           printer manual says that ESCAPE E or CHR$(27)+E is the escape
  2701.           sequence to reset your printer, then enter the following: \027E. 
  2702.           
  2703.                Particularly with laser printers, it may be desirable in
  2704.           some situations to force some carriage returns at the beginning
  2705.           of a job.  This is especially true to line up mailing labels.  To
  2706.           accomodate this, WAMPUM permits the developer to insert carriage
  2707.           return codes in the font setups using the tilde (~).  One tilde
  2708.           means one return.  Two tildes means two returns, etc.  Make
  2709.           certain that ALL tildes follow the complete escape sequence you
  2710.           desire to generate for each font code since characters following
  2711.           tildes are ignored. Do NOT use tildes in the FONTINIT, FONTRESET,
  2712.           FONT0, or FONT2 codes since these have special uses in WAMPUM.
  2713.           
  2714.                Use this process to build the printer table for your
  2715.           printer, and you're all set.  Press the <PgDn> key when you have
  2716.           entered all of the codes desired.
  2717.           
  2718.                Note that you also can edit an existing printer table by
  2719.           entering an * as if you were creating a new printer table.  When
  2720.           WAMPUM prompts for the name of the new printer table, simply
  2721.           enter the name of the old table.  When the data entry screen
  2722.           appears, you will see that codes such as \027 have been converted
  2723.  
  2724.  
  2725.  
  2726.  
  2727.                                        - 39 -
  2728.  
  2729.  
  2730.  
  2731.  
  2732.  
  2733.  
  2734.           by WAMPUM into the actual ASCII character.  In the case of the
  2735.           <ESC> code, this is an arrow pointing to the left.  These codes
  2736.           can be deleted or edited as desired.
  2737.           
  2738.                A final word of warning.  Do NOT press the <ESC> key to
  2739.           enter an escape code!  This key allows you to ABORT updating a
  2740.           printer table.  To enter an escape code as part of a printer
  2741.           string, you must type \027.
  2742.           
  2743.           
  2744.           3.1.8   Relating a Secondary File
  2745.           
  2746.                For purposes of report, label, and form letter output, you
  2747.           may relate or link a secondary data base to an identical field in
  2748.           the primary data base if the following conditions are met.  
  2749.           
  2750.                (1) The secondary data base must be in the default directory
  2751.           or in the path specified by the DOS PATH command.  (2) The
  2752.           secondary data base must be indexed on a field identical in size,
  2753.           type, and field name with a field in the primary data base.  Note
  2754.           that the matching field in the primary data base need not be
  2755.           indexed.  
  2756.           
  2757.                Whenever a report, label, or form letter is run while a
  2758.           related file and index are set, the developer may access data in
  2759.           any of the fields of the matching related file record by
  2760.           specifying the field names with the following syntax:
  2761.           ALIAS->fieldname where ALIAS is the name of the related file and
  2762.           FIELDNAME is the name of the field to be output from the related
  2763.           file.
  2764.           
  2765.                A secondary file may be related in one of two ways.  The
  2766.           first is to select the Z - Zoom/Relate File option on the Main
  2767.           System Menu and enter the name of the file and index to be
  2768.           related.  This relation stays in effect until changed provided
  2769.           you save it as part of the configuration.  Once a file has been
  2770.           related successfully, the file name display on the last line of
  2771.           the Main System Menu screen should look like the following:
  2772.           
  2773.                               FILE: ACCOUNTS/R
  2774.           
  2775.           Any reports. labels, or form letters produced after relating the
  2776.           secondary file may access the fields in the related file also.
  2777.           
  2778.                The second method of relating a file and index is as part of
  2779.           developing the WAMPUM PreFormatted Output file.  This is
  2780.           discussed in a subsequent section of the User's Guide.  It
  2781.           provides additional flexibility since it permits the developer to
  2782.           relate different secondary files and indexes to different
  2783.           reports, labels, and form letters.  WAMPUM Preformatted Output
  2784.           does not rely upon the relation established using the Z option.
  2785.           
  2786.           
  2787.  
  2788.  
  2789.  
  2790.  
  2791.  
  2792.  
  2793.                                        - 40 -
  2794.  
  2795.  
  2796.  
  2797.  
  2798.  
  2799.  
  2800.           3.1.9   Storing the New Configuration (WAMPUM.MEM)
  2801.           
  2802.                The configuration of a given application is stored in a
  2803.           configuration file called WAMPUM.MEM.  You can change the default
  2804.           configuration by picking the configuration option from the Main
  2805.           System Menu. Select * - CONFIG Update.  For each application you
  2806.           build, you may store certain information as a configuration:
  2807.           
  2808.                (1)  A Heading for the Main System Menu
  2809.           
  2810.                (2)  The Default Drives for the Main Data Base, Related
  2811.                     Data Base, and All Other Files
  2812.           
  2813.                (3)  The Name of the Main Data Base, Related Data Base,
  2814.                     and Associated Indexes
  2815.           
  2816.                (4)  The Name of the Printer Configuration File
  2817.           
  2818.                (5)  Whether to Disable Certain Choices on the Main
  2819.                     System Menu
  2820.           
  2821.                (6)  Whether WAMPUM is started with BROWSE mode ON
  2822.           
  2823.                (7)  Whether WAMPUM should maintain an Audit Trail
  2824.           
  2825.                (8)  Whether Users must confirm data entry by pressing
  2826.                     the <ENTER> key in each field
  2827.           
  2828.                (9)  The Left and Right Margin settings for Form Letters
  2829.           
  2830.               (10)  The Output Print Device or Printer Output File Name
  2831.                     if Network mode is enabled
  2832.           
  2833.               (11)  Whether to Enable Network File Sharing
  2834.           
  2835.                Once the application is reconfigured, then WAMPUM remembers
  2836.           the new configuration the next time WAMPUM is run whether it is
  2837.           run in Developer or End-User mode.  This permits a developer to
  2838.           completely customize a WAMPUM application and then turn it over
  2839.           to end-users without the end-user having to master all of the
  2840.           concepts involved in building an application from the ground up.
  2841.           
  2842.           
  2843.           3.1.10  Building Reports, Labels, and Form Letters
  2844.           
  2845.           3.1.10.1  REPORTS
  2846.           
  2847.           3.1.10.1.1  Overview
  2848.           
  2849.                WAMPUM Reports are designed using the Autumn '87 Clipper
  2850.           REPORT Generator, which Nantucket generously has allowed us to
  2851.           distribute without charge.  Before you can create new report
  2852.           forms or revise old ones, you need to make sure the program
  2853.           REPORT.EXE is located in a directory supported by your DOS PATH
  2854.           command.  This will assure that WAMPUM can access the report
  2855.           generator whenever you want to design or redesign a report form.
  2856.  
  2857.  
  2858.  
  2859.                                        - 41 -
  2860.  
  2861.  
  2862.  
  2863.  
  2864.  
  2865.  
  2866.           As indicated previously, WAMPUM requires a minimum of 420K memory
  2867.           to access the report writer from within WAMPUM with DOS 3.1.  If
  2868.           you are short on memory, you can run REPORT.EXE from the DOS
  2869.           level by typing REPORT filename where filename is the name of the
  2870.           report you wish to create or revise.
  2871.           
  2872.                Before designing a report, you will always want to print out
  2873.           a listing of the file structure with which you will be working. 
  2874.           Pick the S - Select Utilities option and specify T or Y for the
  2875.           List File Structure option.  Then type Y when asked whether to
  2876.           print the structure listing.
  2877.           
  2878.                The Clipper Report Generator is quite similar to dBASE III's
  2879.           report writer which is accessed in dBASE with the command CREATE
  2880.           REPORT filename or MODIFY REPORT filename.  Thus, anyone who is
  2881.           generally familiar with the dBASE III method of designing report
  2882.           forms will have no problem doing the same with WAMPUM.  Please
  2883.           note that WAMPUM 3.1 includes the new Clipper REPORT Generator
  2884.           which accomodates special features added with dBASE III Plus.
  2885.           
  2886.                A report form is a file which contains a template telling
  2887.           WAMPUM which pieces of information you want to extract from a
  2888.           data base.  Note that we said "which pieces of information"
  2889.           meaning which fields rather than which records.  This is an
  2890.           important distinction since neither WAMPUM reports nor dBASE
  2891.           reports control which records print on a report.  That is
  2892.           controlled with record selection using the S - Select Utilities
  2893.           option in WAMPUM.  You might more accurately refer to report
  2894.           forms as a formatting mold through which you "pour" information
  2895.           from a data base.  
  2896.           
  2897.                All WAMPUM reports must have a DOS-standard file name with
  2898.           no file extension.  As is true with dBASE, WAMPUM supplies the
  2899.           file extension of .FRM with all report forms.
  2900.           
  2901.                The R - REPORTS Menu option on the WAMPUM Main System Menu
  2902.           provides three capabilities to the user.  First, you can run any
  2903.           existing report form whether created with the Clipper Report
  2904.           Generator or with the dBASE III Plus report writer.  Second, you
  2905.           can create new report forms using the Clipper Report Generator. 
  2906.           Finally, you can revise existing report forms using the Clipper
  2907.           Report Generator.  The reports need not have been created
  2908.           originally with the Clipper Report Generator.
  2909.           
  2910.                How to run reports is explained in the end-user section of
  2911.           this User's Guide.  The following two sections address how to
  2912.           create new report forms and revise old ones.
  2913.           
  2914.           
  2915.           3.1.10.1.2  Creating A New Report Format
  2916.           
  2917.                After printing a listing of the file structure with which
  2918.           you will be working, the next step in creating a new report form
  2919.           is to select the R - Reports Menu option from the WAMPUM Main
  2920.           System Menu.  When prompted for the name of the report form to
  2921.           run, type an asterisk (*) and press the <PgDn> key.  Then enter
  2922.  
  2923.  
  2924.  
  2925.                                        - 42 -
  2926.  
  2927.  
  2928.  
  2929.  
  2930.  
  2931.  
  2932.           the name you wish to assign to this new report form.  Do not
  2933.           enter a file extension since WAMPUM automatically assigns .FRM as
  2934.           the file extension in keeping with the dBASE naming convention. 
  2935.           WAMPUM then will run the Clipper Report Generator assuming you
  2936.           have sufficient memory to support it and assuming WAMPUM can find
  2937.           REPORT.EXE in the DOS PATH.
  2938.           
  2939.                As is true with the dBASE III report writer, the Clipper
  2940.           Report Generator divides a report into three parts:
  2941.           
  2942.           
  2943.                          1.  Page Heading & Format Settings
  2944.           
  2945.                          2.  Break Level Controls
  2946.           
  2947.                          3.  Report Column Contents & Headings
  2948.           
  2949.                The Page Heading & Format Settings screen allows you to
  2950.           specify the title of your report as well as the dimensions of the
  2951.           paper on which the report will be printed or displayed.  You also
  2952.           indicate whether the report should be single or double-spaced and
  2953.           whether form feeds should be generated before and after a report
  2954.           is produced.  Unlike dBASE III, WAMPUM always generates a form
  2955.           feed at the end of a report whether requested or not.  This
  2956.           assures your printer always is at TOP OF FORM for the next job.  
  2957.           
  2958.                For the Page Heading, just type in whatever title you want
  2959.           to appear at the top of your report when it prints out.  Do NOT
  2960.           center the title since WAMPUM will do this for you automatically.
  2961.           If you want a multi-line heading, just type it the way it should
  2962.           appear at the top of each page of the report.  
  2963.           
  2964.                Once you have entered a Page Heading, press the <ENTER> key
  2965.           to move to the Format Settings fields.  There are eight options:
  2966.           
  2967.                          1.  Enter page width  . . . . . .  80
  2968.                          2.  Enter left margin . . . . . .   8
  2969.                          3.  Enter right margin  . . . . .   0
  2970.                          4.  Enter no. lines per page  . .  58
  2971.                          5.  Double spaced report? . . . .   N
  2972.                          6.  Page eject before printing? .   Y
  2973.                          7.  Page eject after printing?  .   N
  2974.                          8.  Plain page  . . . . . . . . .   N
  2975.           
  2976.                Shown beside each of the above entries is the default value
  2977.           which will be used unless you change them.  The Plain Page option
  2978.           controls whether a report heading with date prints at the top of
  2979.           each page of your report.
  2980.           
  2981.                For normal printers, the default settings usually are fine
  2982.           except you may wish to narrow the left margin to about 2 just to
  2983.           provide more report space for information. In addition, you may
  2984.           wish to change the page eject before printing option to N. 
  2985.           
  2986.  
  2987.  
  2988.  
  2989.  
  2990.  
  2991.                                        - 43 -
  2992.  
  2993.  
  2994.  
  2995.  
  2996.  
  2997.  
  2998.                For those using a laser printer, you will need to adjust the
  2999.           settings or your reports will run off the bottom of the page
  3000.           since most lasers force a 1/2 inch margin at the top and bottom
  3001.           of a page.  With standard 10 pitch, portrait mode reports, the
  3002.           appropriate settings are 80, 2, 0, 56, and N or Y depending upon
  3003.           whether you want the report single or double-spaced.  If you are
  3004.           printing sideways (landscape mode) with FONT8 (10 pitch) or with
  3005.           FONT9  (16 pitch), then the settings should be as follows:
  3006.           
  3007.                          FONT8:    105, 2, 0, 40, and N or Y
  3008.           
  3009.                          FONT9:    160, 2, 0, 40, and N or Y
  3010.           
  3011.           
  3012.                Once you have entered the Page Heading and report settings,
  3013.           press the <PgDn> key to display the second screen of the Clipper
  3014.           report generator.  This screen is used principally to break
  3015.           reports into sections based upon a change in the value of some
  3016.           key field in the data base.  For beginners, just press <PgDn> to
  3017.           skip this screen.  
  3018.           
  3019.                For experts, you should recall that your report will not
  3020.           break properly on the field specified in Group/Subtotal on unless
  3021.           that same field is the primary index in use when the report is
  3022.           run.  Similarly, if you specify a subgroup field name, this must
  3023.           be a subfield in the primary index as well. An example may clear
  3024.           the air a little.
  3025.           
  3026.                Suppose you are producing a report of beauty contestants,
  3027.           and you want the report paginated by state and subdivided within
  3028.           the state by the city of residence of each contestant.  To
  3029.           produce such a report, you first would need to build a special
  3030.           index (**), give the index a name such as STATCITY, and  specify
  3031.           the fields to be indexed as STATE+CITY.  Whenever the report is
  3032.           run, that index must be the primary index. Then, in the report
  3033.           form, specify Group/subtotal on: STATE, Summary report only?
  3034.           N, Eject after subtotal? Y, Group/subtotal heading: Contestant
  3035.           state is , Subgroup/subsubtotal on CITY, Subgroup heading:
  3036.           Contestant city is .  
  3037.           
  3038.                What happens if you forget to set the primary index to
  3039.           STATCITY?  When the report is run, WAMPUM assumes you know what
  3040.           you are doing.  So, as the report sifts through your data base,
  3041.           it will do just what you told it.  Whenever, the city of the
  3042.           contestant changes, the report will print a subheading of
  3043.           Contestant city is Los Angeles or whatever, and when the state
  3044.           changes, the report will issue a page break and print a new page
  3045.           heading and group heading at the top of the next page saying
  3046.           Contestant state is Utah or whatever. However, since you forgot
  3047.           to put the proper index in effect, the actual records in the data
  3048.           base will not be in STATE and CITY order.  Thus, you may get a
  3049.           page with one contestant from California, then a page with one
  3050.           from Utah, then another page with one from California, etc.  In
  3051.           short, you probably will get about a 200 page report rather than
  3052.  
  3053.  
  3054.  
  3055.  
  3056.  
  3057.                                        - 44 -
  3058.  
  3059.  
  3060.  
  3061.  
  3062.  
  3063.  
  3064.           the 5 page report you expected.  As noted earlier, if you are a
  3065.           beginning report writer, skip this screen in the report writer
  3066.           until you invest in your own paper company.
  3067.           
  3068.                The meat of the coconut in creating report forms is the
  3069.           Field Contents screen.  This is the screen on which you tell the
  3070.           report generator which piece of information you want printed on
  3071.           the actual report.  For example, we may want to print the beauty
  3072.           contestant's name, her hometown, state, birthday, and, of course,
  3073.           measurements.  Each field of information should be specified on a
  3074.           separate Field Contents screen (unless you are an expert).  When
  3075.           you finish specifying one field of information to be output, you
  3076.           simply <PgDn> to get another screen.  This process continues
  3077.           until you have specified all of the pieces of information to be
  3078.           printed in the various columns of your report. Note that each
  3079.           screen asks for five pieces of information:
  3080.           
  3081.                          1.  CONTENTS
  3082.                          2.  # decimal places  0
  3083.                          3.  Totals?  N
  3084.                          4.  HEADER
  3085.                          5.  WIDTH
  3086.           
  3087.                For purposes of our example, let's assume the finished
  3088.           report should output something like the following:
  3089.           
  3090.           
  3091.           
  3092.           CONTESTANT'S NAME     HOMETOWN    STATE   BIRTHDAY  MEASUREMENTS
  3093.           -----------------     ----------  -----   --------  ------------
  3094.           Betty Boop            Podunck     CA      09/27/68  38-22-36
  3095.           Dolly Partin          Nashville   TN      09/27/45  48-28-38
  3096.           
  3097.                CONTENTS is asking for the legal field name of the field to
  3098.           print in the current column of the report.  For experts, CONTENTS
  3099.           may also contain any legal dBASE expression. In addition, you can
  3100.           force WAMPUM to create multi-line reports by specifying more than
  3101.           one field name for the contents field.  See the special note on
  3102.           the correct syntax for this below. Columns of a report are built
  3103.           from left to right across the screen or page when a report is
  3104.           produced.  Since we want the contestant's name in the first
  3105.           column, we would specify FULLNAME as the field to print assuming
  3106.           this was the name assigned to this field in our data base.   You
  3107.           can press the DOWN CURSOR or <ENTER> key to move down to the #
  3108.           decimal places field; however, the DOWN CURSOR is safer since a
  3109.           little Clipper bug sometimes assumes you're finished building
  3110.           your report when you press <ENTER>.
  3111.           
  3112.                Unless you have specified a numeric expression  for the
  3113.           CONTENTS, both the # decimal places field and the Totals? field
  3114.           should be left alone.  If you are outputting numeric data, then
  3115.           the # decimal places field allows you to specify how many decimal
  3116.           positions should be printed for this column of the report.  Enter
  3117.           a number and press the DOWN CURSOR.  Totals? allows you to
  3118.           specify whether you want the numeric expression totaled (and
  3119.           subtotaled) at breaks in the report and at the end of the
  3120.  
  3121.  
  3122.  
  3123.                                        - 45 -
  3124.  
  3125.  
  3126.  
  3127.  
  3128.  
  3129.  
  3130.           report.  Note again that you cannot TOTAL anything except a
  3131.           numeric expression.  If you just want a COUNT of records, this is
  3132.           covered below separately.  Then, DOWN CURSOR to the HEADER field.
  3133.           
  3134.                HEADER is asking for the column heading to display for this
  3135.           column of the report.  This is free-form text of your choosing. 
  3136.           It should convey to the reader of the report what the contents of
  3137.           this column of the report actually are.  The only precaution here
  3138.           is that the header typically should not be much wider in length
  3139.           than the maximum field width being displayed in this column. 
  3140.           Otherwise, you are just wasting space across the report since the
  3141.           WIDTH must be the wider of the field maximum width and the header
  3142.           width.  In the example above, type CONTESTANT'S NAME on the first
  3143.           header line, then press the DOWN CURSOR and type ----------------
  3144.           on the next line to simulate an underscore.  Use the DOWN CURSOR
  3145.           to move down to the WIDTH field.
  3146.           
  3147.                WIDTH is asking for the column width of this column of the
  3148.           report.  As noted above, this width should be the greater of the
  3149.           field maximum width or the longest line of the column headers.
  3150.           Note that the Clipper Report Generator loves the number 10.  This
  3151.           is the default, and occasionally when you edit a previous report,
  3152.           the report generator sometimes forgets the width you previously
  3153.           specified.  You may have to reenter it.
  3154.           
  3155.                Once you have entered the width desired, press <PgDn> and a
  3156.           second Field Contents Screen will appear.  Fill this one in for
  3157.           the next column of your report, then <PgDn> again.  Continue this
  3158.           process until you have completed all of the fields which you want
  3159.           output in the report.  Then <PgDn> to another blank Field
  3160.           Contents Screen.  Note that you MUST ALWAYS be on a blank Field
  3161.           Contents screen before electing to SAVE your report template. If
  3162.           you violate this rule, you probably will lose some of the columns
  3163.           of your report. Press the <ESC> key to tell the report writer you
  3164.           are finished.  
  3165.           
  3166.                You will be asked whether you are finished.  Typing a Y
  3167.           saves the report form to disk.  Typing an N returns you to the
  3168.           top of the current Field Contents Screen.  Pressing <ESC> aborts
  3169.           the report creation process and does NOT save the report.
  3170.           
  3171.                What happens if you want to change something before you have
  3172.           first saved the report?  Simply press <PgUp> to move back through
  3173.           the screens you have already entered.  Then <PgDn> to return to a
  3174.           blank Field Contents Screen before SAVING the report.  You
  3175.           probably will have to use the <ENTER> key to move through the
  3176.           last completed Field Contents Screen to get to a blank screen.
  3177.           
  3178.                Suppose you want to count the number of records output in
  3179.           the report.  This is perhaps the weakest link in both the dBASE
  3180.           report writer and the Clipper clone.  The easiest method for
  3181.           doing this is to include a final Field Contents Screen with the
  3182.           following specifications.  For the CONTENTS, type the number 1. 
  3183.           For DECIMALS, leave it at 0.  For TOTALS, type Y.  For the
  3184.           HEADER, type TOTAL and a second row of -----.  For width, type
  3185.           5.  This will tell WAMPUM to count the records as the report is
  3186.  
  3187.  
  3188.  
  3189.                                        - 46 -
  3190.  
  3191.  
  3192.  
  3193.  
  3194.  
  3195.  
  3196.           produced and print a total at the bottom.  It will also uglify
  3197.           your report by producing a column of 1's along the right margin
  3198.           of your report.
  3199.           
  3200.                Suppose you want to do some date calculations.  In the above
  3201.           example, suppose we want to compute the beauty contestant's age. 
  3202.           For the CONTENTS field, specify (DATE()-BIRTHDAY)/365.  Leave the
  3203.           decimals at 0, and totals as N.  For HEADER, insert AGE on the
  3204.           first line and --- on the second.  For WIDTH, type 3.  This tells
  3205.           WAMPUM to perform the following calculation each time a record
  3206.           qualifies for the report and output the answer in this column. 
  3207.           Subtract the contestant's birthdate from today's date.  This
  3208.           yields a number.  Divide this number by 365 to get the AGE in
  3209.           years of the contestant.  Note the parentheses around the
  3210.           subtraction.  In algebra, multiplication and division take
  3211.           precedence over addition and subtraction.  This means that WAMPUM
  3212.           would ordinarily attempt to perform the division before the
  3213.           subtraction.  Since you cannot divide a DATE field by a number,
  3214.           this would send WAMPUM into the OZONE when the report was run. 
  3215.           The parentheses tells WAMPUM to carry out the calculations in
  3216.           parentheses first before performing the division.  Since dBASE
  3217.           and WAMPUM can add and subtract dates, this will yield a numeric
  3218.           value which then can be divided by 365.
  3219.           
  3220.                Suppose you want to output the contents of a MEMO field in a
  3221.           report.  A minor "bug" in the Clipper compiler causes WAMPUM
  3222.           reports with a MEMO field to format strangely.  This now has been
  3223.           fixed through the addition of a new function: MEMOTRAN().  To
  3224.           output a MEMO field, enter the following expression for the field
  3225.           contents: MEMOTRAN(fieldname) where fieldname is the actual name
  3226.           of the MEMO field in your data base.  You may specify a column
  3227.           width of any length desired and WAMPUM will format the output
  3228.           accordingly.  Again, special thanks to Nantucket for providing
  3229.           this "fix" at no expense to anyone.
  3230.           
  3231.                Suppose you want a multi-line report with a name and address
  3232.           in a single column followed by several other pieces of data in
  3233.           separate columns.  For the contents field, you may specify more
  3234.           than one field for output in the column so long as all the fields
  3235.           evaluate to character strings.  To force multiple lines within a
  3236.           column, you simply reduce the column width to account for the
  3237.           amount of data which should display on each line plus one space.
  3238.           Then adjust your various lines of data to match the column width.
  3239.           A simple example should help. Assume you have a data base with a
  3240.           15 character FIRSTNAME field, 15 character LASTNAME field, 30
  3241.           character ADDRESS field, 15 character CITY field, and 2 character
  3242.           STATE field.  When the report is produced, we want all this
  3243.           information displayed in a single, multi-line column of the
  3244.           report.  To get the FIRSTNAME and LASTNAME fields to display on
  3245.           the same line would require 30 characters plus a space between
  3246.           the two fields and one space at the end of the LASTNAME to break
  3247.           the line.  Thus, the column width should be set to 32.  The
  3248.           correct CONTENTS expression would be as follows:
  3249.             
  3250.             SUBSTR(TRIM(FIRSTNAME)+SPACE(1)+LASTNAME+SPACE(31),1,32)+ 
  3251.             ADDRESS+SPACE(2)+TRIM(CITY)+", "+STATE
  3252.  
  3253.  
  3254.  
  3255.                                        - 47 -
  3256.  
  3257.  
  3258.  
  3259.  
  3260.  
  3261.  
  3262.           
  3263.                WAMPUM reports also support the immediate IF function
  3264.           implemented in dBASE III Plus.  The syntax of the function is as
  3265.           follows: IIF(Logical Expression,On True,On False).  This may be
  3266.           included to branch to one of two values in a report depending the
  3267.           value of the logical expression.  For example, suppose you wanted
  3268.           to display "HITCHED" if a MARRIED field was True but "AVAILABLE"
  3269.           if the field was False.  The correct syntax in your CONTENTS
  3270.           field of the report would be IIF(MARRIED,"HITCHED","AVAILABLE"). 
  3271.           Note that the OnTrue and OnFalse values may be character strings,
  3272.           dates, numeric values, or logical expressions so long as both are
  3273.           of the same data type. Any good reference work on dBASE III Plus
  3274.           can provide more examples of the immediate IF function.
  3275.           
  3276.                The final thing to be careful of in creating reports is to
  3277.           make sure the total field widths specified for your report do not
  3278.           exceed the PAGE WIDTH specified when you set up the report.  A
  3279.           little math in advance will solve this problem.  Remember that
  3280.           WAMPUM always leaves a single space between columns of the
  3281.           report.  This is in addition to the field widths you specify!
  3282.           
  3283.           
  3284.           3.1.10.1.3  Modifying Existing Report Formats
  3285.           
  3286.                To modify an existing report, select the R - Report Menu
  3287.           option from the Main System Menu.  Look at the listing of reports
  3288.           which displays and write down the name of the one to be
  3289.           modified.  Then type an asterisk (*) as if you were creating a
  3290.           new report.  Press <PgDn>.  When WAMPUM prompts for the name of
  3291.           your new report, enter the OLD name and press <ENTER>.  The
  3292.           discussion above with respect to creating a new report applies as
  3293.           well to modifying an existing one.  As noted, be careful to check
  3294.           the defaults and make certain the Clipper Report Generator did
  3295.           not reimpose its defaults rather than the values you specified. 
  3296.           You then can SAVE or ABORT saving the revised report just as was
  3297.           done in creating a new one.  Before SAVING a report, make certain
  3298.           that you have moved to the end of your existing report template
  3299.           and that a BLANK CONTENTS field is displayed on the screen!
  3300.           
  3301.           
  3302.           3.1.10.1.4  Outputting MEMO fields in Reports
  3303.           
  3304.                MEMO fields may be formatted as columns in a report just
  3305.           like a character string except for the syntax of the CONTENTS
  3306.           expression.  With character fields, you typically specify the
  3307.           actual name of the field to be output.  With a MEMO field, use
  3308.           the following syntax where COMMENTS is the actual field name
  3309.           given to the MEMO field you wish to output in the report:
  3310.           
  3311.                               MEMOTRAN(COMMENTS)
  3312.           
  3313.                MEMOTRAN is a Clipper function which fixes a quirk in the
  3314.           Clipper report writing software.  Using the above syntax will
  3315.           permit a MEMO field to be produced in a report column of
  3316.  
  3317.  
  3318.  
  3319.  
  3320.  
  3321.                                        - 48 -
  3322.  
  3323.  
  3324.  
  3325.  
  3326.  
  3327.  
  3328.           virtually any width desired.  Simply specify a field width of
  3329.           your choice and the MEMOTRAN function will assure that the text
  3330.           in the MEMO field is word-wrapped to fit in the specified width.
  3331.           
  3332.           
  3333.           3.1.10.2  LABELS
  3334.           
  3335.           3.1.10.2.1  Overview
  3336.           
  3337.                WAMPUM Label Templates are designed using the Clipper LABEL
  3338.           Generator, which Nantucket generously has allowed us to
  3339.           distribute without charge.  WAMPUM requires 420K to access the
  3340.           label generator program from the Main System Menu. If you are
  3341.           short on memory, you may run the label program from the DOS
  3342.           prompt using the following syntax: LABEL filename where filename
  3343.           is the name of the label template to be created or revised.
  3344.           
  3345.                Before you can create new label templates or revise old
  3346.           ones, you need to make sure the program LABEL.EXE is located in a
  3347.           directory supported by your DOS PATH command.  This will assure
  3348.           that WAMPUM can access the label generator whenever you want to
  3349.           design or redesign a label form.  
  3350.           
  3351.                You should also be aware that beginning with DOS 3.0, a DOS
  3352.           program named LABEL.COM is provided to rename volume labels. 
  3353.           Make certain that your DOS PATH checks the subdirectory
  3354.           containing Clipper's LABEL.EXE program before checking the DOS
  3355.           subdirectory containing LABEL.COM.  Otherwise, WAMPUM will
  3356.           execute the wrong program when you attempt to create or revise
  3357.           label forms.  Another approach is to rename LABEL.COM to some
  3358.           other file name such as NEWLABEL.COM.  This will avoid conflict.
  3359.           
  3360.                Before designing a label, you will always want to print out
  3361.           a listing of the file structure with which you will be working. 
  3362.           Pick the S - Select Utilities option and specify T or Y for the
  3363.           List File Structure option.  Then type Y when asked whether to
  3364.           print the structure listing.
  3365.           
  3366.                The Clipper Label Generator is quite similar to the dBASE
  3367.           III label writer which is accessed in dBASE with the command
  3368.           CREATE LABEL filename or MODIFY LABEL filename.  Thus, anyone who
  3369.           is generally familiar with the dBASE III method of designing
  3370.           label forms will have no problem doing the same with WAMPUM.
  3371.           
  3372.                A label form is a file which contains instructions telling
  3373.           WAMPUM which pieces of information you want to extract from a
  3374.           data base and place on labels.  Note that we said "which pieces
  3375.           of information" meaning which fields rather than which records. 
  3376.           This is an important distinction since neither WAMPUM labels nor
  3377.           dBASE labels control which records print on a label.  That is
  3378.           controlled with record selection using the S - Select Utilities
  3379.           in WAMPUM.  You might more accurately refer to label forms as a
  3380.           formatting template through which you "pour" your data.  
  3381.           
  3382.  
  3383.  
  3384.  
  3385.  
  3386.  
  3387.                                        - 49 -
  3388.  
  3389.  
  3390.  
  3391.  
  3392.  
  3393.  
  3394.                All WAMPUM labels must have a DOS-standard file name with no
  3395.           file extension.  As is true with dBASE, WAMPUM supplies the file
  3396.           extension of .LBL with all label forms.
  3397.           
  3398.                The L - LABELS for Mail option on the WAMPUM Main System
  3399.           Menu provides three capabilities to the user.  First, you can run
  3400.           any existing label form whether created with the Clipper Label
  3401.           Generator or with the dBASE III or dBASE III Plus label maker. 
  3402.           Second, you can create new label forms using the Clipper Label
  3403.           Generator.  Finally, you can revise existing label forms using
  3404.           the Clipper Label Generator.  The labels need not have been
  3405.           created originally with the Clipper Label Generator.
  3406.           
  3407.                How to run labels is explained in the end-user section of
  3408.           this User's Guide.  The following two sections address how to
  3409.           create new label forms and revise old ones.
  3410.           
  3411.           
  3412.           3.1.10.2.2  Creating A New Label Format
  3413.           
  3414.                After printing a listing of the file structure with which
  3415.           you will be working, the next step in creating a new label form
  3416.           is to select the L - Labels for Mail option from the WAMPUM Main
  3417.           System Menu.  When prompted for the name of the label form to
  3418.           run, type an asterisk (*) and press the <PgDn> key.  Then enter
  3419.           the name you wish to assign to this new label form.  Do not enter
  3420.           a file extension since WAMPUM automatically assigns .LBL as the
  3421.           file extension in keeping with the dBASE naming convention. 
  3422.           WAMPUM then will run the Clipper Label Generator assuming you
  3423.           have sufficient memory to support it and assuming WAMPUM can find
  3424.           LABEL.EXE in the DOS PATH before finding DOS's LABEL.COM program.
  3425.           
  3426.                As is true with the dBASE III label writer, the Clipper
  3427.           Label Generator divides a label form into two parts:
  3428.           
  3429.                          1.  Label Settings
  3430.           
  3431.                          2.  Label Contents 
  3432.           
  3433.                There are six items of information which can be set to
  3434.           specify how the labels should be produced.  These include the
  3435.           following with their default settings:
  3436.           
  3437.                          1.  Width of Label            35
  3438.                          2.  Height of Label            5
  3439.                          3.  Left Margin                0
  3440.                          4.  Lines Between Labels       1
  3441.                          5.  Spaces Between Labels      0
  3442.                          6.  No. of Labels Across       1
  3443.           
  3444.                Width of Label refers to the maximum width of any text entry
  3445.           on any label produced.  Height of Label means the maximum number
  3446.           of lines per label.  Left Margin is the starting column position
  3447.           for the left-most label.  Lines Between Labels specifies the
  3448.           number of blank lines between each completed label. Spaces
  3449.           Between Labels is the number of blank columns horizontally
  3450.  
  3451.  
  3452.  
  3453.                                        - 50 -
  3454.  
  3455.  
  3456.  
  3457.  
  3458.  
  3459.  
  3460.           between labels when two or more are produced across the page or
  3461.           screen.  Number of Labels Across allows you to specify how many
  3462.           columns of labels will be printed across the page (up to 5).
  3463.           
  3464.                The main consideration to keep in mind in producing labels
  3465.           is the following.  There is no pagination control for labels. All
  3466.           label forms assume an unending supply of continuous-form label
  3467.           stock in your printer.  If you are using a laser printer, then
  3468.           printer codes will have to be used to set top of form and page
  3469.           length to match the label format desired with one exception. 
  3470.           WAMPUM knows the format for 33-UP LABELS (11 labels per page with
  3471.           3 across) if you use the following settings for the label form
  3472.           and specify FONT7 with the HPLASERA or HPLASERB printer table:
  3473.           
  3474.                          1.  Width of Label            24
  3475.                          2.  Height of Label            4
  3476.                          3.  Left Margin                0
  3477.                          4.  Lines Between Labels       2
  3478.                          5.  Spaces Between Labels      4
  3479.                          6.  No. of Labels Across       3
  3480.           
  3481.                Once you have entered the label settings desired, press
  3482.           <PgDn> to move to the Label Contents Screen.  In this screen, you
  3483.           enter field names to be produced on the labels much as was done
  3484.           on the Field Contents Screen with Report Forms.  Then press <ESC>
  3485.           when you have completed filling out the field expressions which
  3486.           should appear on each line of the label.  You will be prompted to
  3487.           answer whether to save the new label format. A sample of field
  3488.           expressions appears next for a typical mailing label.  All of the
  3489.           names in BOLD are assumed to be the actual field names:
  3490.           
  3491.           
  3492.                1    TRIM(FIRSTNAME) + " " + TRIM(LASTNAME)
  3493.                2    ADDRESS1
  3494.                3    ADDRESS2
  3495.                4    TRIM(CITY) + ", " + TRIM(STATE) + " " + ZIPCODE
  3496.           
  3497.           
  3498.           3.1.10.2.3  Modifying An Existing Label Format
  3499.           
  3500.                To modify an existing label format, select the L - Labels
  3501.           for Mail option from the Main System Menu.  Look at the listing
  3502.           of labels which displays and write down the name of the one to be
  3503.           modified.  Then type an asterisk (*) as if you were creating a
  3504.           new label form.  Press <PgDn>.  When WAMPUM prompts for the name
  3505.           of your new label, enter the OLD name and press <ENTER>.  The
  3506.           discussion above with respect to creating a new label applies as
  3507.           well to modifying an existing one.  As noted, be careful to check
  3508.           the defaults and make certain the Clipper Label Generator did not
  3509.           reimpose its defaults rather than the values you specified.  You
  3510.           then can SAVE or ABORT saving the revised label form just as was
  3511.           done in creating a new one.  
  3512.           
  3513.           
  3514.  
  3515.  
  3516.  
  3517.  
  3518.  
  3519.                                        - 51 -
  3520.  
  3521.  
  3522.  
  3523.  
  3524.  
  3525.  
  3526.           3.1.10.3  FORM LETTERS
  3527.           
  3528.           3.1.10.3.1  Overview
  3529.           
  3530.                One of the most critical limitations of dBASE III has been
  3531.           its lack of a convenient "mail merge" interface which would allow
  3532.           selected data to be extracted from a data base and inserted into
  3533.           form letters.  WAMPUM now provides this missing link through its
  3534.           built-in Form Letter generator.
  3535.           
  3536.                Actually, a WAMPUM form letter is nothing more than a
  3537.           standard dBASE III data base with a single field designated as
  3538.           LINE1.  In executing a form letter merge through either the T -
  3539.           Form Letter Menu or via W - Wampum Preformatted Output, WAMPUM
  3540.           simply extracts data from your data base and merges it with the
  3541.           text contained in the form letter data base file you specify.
  3542.           
  3543.                WAMPUM automatically handles word wrapping as part of the
  3544.           merge process.  In addition, the Form Letter Generator includes
  3545.           powerful programming functions which allow you to test the
  3546.           contents of fields in a data base and branch to various
  3547.           paragraphs of the form letter depending upon the contents of the
  3548.           data base.  The current version of WAMPUM assumes that you will
  3549.           be outputting your form letters on 8-1/2 x 11 paper using 10
  3550.           pitch type.  You may adjust the left and right margin settings in
  3551.           the WAMPUM Configuration Screen if necessary.
  3552.           
  3553.                Based upon end-user's suggestions, a number of enhancements
  3554.           have been added to the form letter functions in WAMPUM 3.1. 
  3555.           These include the ability to open and manipulate up to 5 related
  3556.           data bases within any form letter file.  You also may now use an
  3557.           index to generate a form letter for any selected record in your
  3558.           active data base.  This avoids having to make a full pass through
  3559.           the main data base to generate only a few form letters.
  3560.           
  3561.                The following sections describe how to create an empty form
  3562.           letter as well as how to construct the form letter data base once
  3563.           the file has been created.  The end-user section of this Guide
  3564.           describes the process of merging data into a form letter file.
  3565.           
  3566.           
  3567.           3.1.10.3.2  Creating a New Form Letter File
  3568.           
  3569.                To create a new form letter, select T - Form Letter Menu
  3570.           from the Main System Menu.  When prompted for the name of the
  3571.           form letter to run, type an asterisk (*) and press <PgDn>.  You
  3572.           then will be prompted to name the new form letter.  This name
  3573.           must start with T- and then up to a 6 character name.  WAMPUM
  3574.           will add the .DBF file extension and build the form letter file.
  3575.           
  3576.           
  3577.           3.1.10.3.3  Building Data in Form Letter File
  3578.           
  3579.                To actually build the form letter, use F - File Select to
  3580.           select the form letter file with which you want to work, just as
  3581.           you would select any other data base file to use.
  3582.  
  3583.  
  3584.  
  3585.                                        - 52 -
  3586.  
  3587.  
  3588.  
  3589.  
  3590.  
  3591.  
  3592.           
  3593.                Before actually entering data for the form letter, some
  3594.           explanation of how form letters are constructed and how they are
  3595.           output will assist in your design.
  3596.           
  3597.                When WAMPUM generates form letters, it reads the form letter
  3598.           file to get the text for the form letter.  All leading and
  3599.           trailing spaces in each record are stripped off when WAMPUM
  3600.           builds the text to print.  WAMPUM then reads the next record in
  3601.           the form letter file and appends it with a single leading space
  3602.           to what was in the previous record.  For example, each field in a
  3603.           form letter record may contain up to 136 characters.  Suppose the
  3604.           the following two records were in the file:
  3605.           
  3606.                    Hello there,
  3607.                      Cutie!
  3608.           
  3609.                When this form letter was printed, the text would read:
  3610.           
  3611.           Hello there, Cutie!
  3612.           
  3613.                Note that there would be no indentation from the left
  3614.           margin, and all other spaces would be trimmed except the one
  3615.           space added between the two records.  
  3616.           
  3617.                How do you get spaces when you really want them?  This is
  3618.           done by inserting CHR(255) on the left margin of a record.  Then
  3619.           it can be followed by as many spaces as desired.  To insert this
  3620.           character, hold down the ALT key and type 255 with the numeric
  3621.           keypad.
  3622.           
  3623.                WAMPUM Form Letters also may contain markers (field data
  3624.           expressions) which tell WAMPUM to extract or evaluate information
  3625.           in the primary data base when the form letter is merged.  The
  3626.           main rule to remember insofar as field data expressions are
  3627.           concerned is that you may have only one such expression in each
  3628.           record of a form letter file.
  3629.           
  3630.                A FIELD DATA EXPRESSION always begins and ends with //.  In
  3631.           its simplest form, an expression such as //LASTNAME// would tell
  3632.           WAMPUM to extract the contents of the LASTNAME field in the
  3633.           current record and insert it into the form letter at this place. 
  3634.           The beginning and ending //'s must be part of the same record.
  3635.           
  3636.                With some Field Data Expressions, you may block off a
  3637.           section of text in the form letter which will be affected by the
  3638.           evaluation of the expression itself.  For instance, if a
  3639.           particular field is blank in the data base, WAMPUM form letters
  3640.           may contain a special code telling WAMPUM to omit all of the text
  3641.           which has been blocked off.  TEXT MARKERS consist of @@ at the
  3642.           beginning and ending of the affected text.  Note that these
  3643.           markers may not extend beyond a single record.  Thus, you cannot
  3644.           have one pair of @'s in record 5 and the other pair in record 6.
  3645.  
  3646.  
  3647.  
  3648.  
  3649.  
  3650.  
  3651.                                        - 53 -
  3652.  
  3653.  
  3654.  
  3655.  
  3656.  
  3657.  
  3658.           An example of the syntax would be the following.  Suppose you
  3659.           want to thank people for contributing to your reelection
  3660.           campaign.  In your data base is a field CONTRIBDT which will be
  3661.           empty if no contribution has been received.  The record entry in
  3662.           the form letter might say:
  3663.           
  3664.           @@Thanks for being such a great supporter!//*CONTRIBDT//@@
  3665.           
  3666.                This entry means if CONTRIBDT is not blank, then print the
  3667.           text: Thanks for being such a great supporter!  Otherwise, leave
  3668.           this sentence out of the form letter entirely.
  3669.           
  3670.                The following section describes all FIELD DATA EXPRESSIONS
  3671.           implemented as of version 3.1 of WAMPUM.
  3672.           
  3673.                Another difference in WAMPUM Form Letters and standard text
  3674.           is that WAMPUM needs to know when you really do want to end a
  3675.           paragraph.  This is referred to as a hard carriage return with
  3676.           many word processing packages.  WAMPUM interprets a blank record
  3677.           in the form letter file or a record beginning with a tilde (~) as
  3678.           a hard carriage return.  Note that if you want a hard return in a
  3679.           form letter and a blank line between paragraphs, you will need to
  3680.           insert two blank records in the form letter file or two records
  3681.           beginning with a tilde.  All text following a tilde is ignored if
  3682.           the tilde is the first character on the line.
  3683.           
  3684.                Finally, remember that WAMPUM form letters are built on the
  3685.           fly when you actually run the form letter program.  Make certain
  3686.           that you end all form letter files with at least one blank record
  3687.           and preferably two.  This will assure that the form letter buffer
  3688.           is purged before the next form letter is produced.
  3689.           
  3690.           
  3691.           3.1.10.3.4  WAMPUM Field Data Expressions
  3692.           
  3693.                What follows is a listing of the syntax for various FIELD
  3694.           DATA EXPRESSIONS together with an example of each expression. 
  3695.           The best way to get a feel for using WAMPUM Form Letters is to
  3696.           build a few.  It provides more power and flexibility in this area
  3697.           than any commercial product on the market.  Like any powerful
  3698.           programming tool, however, it takes a little getting used to.
  3699.           
  3700.           //LASTNAME//   Allows imbedding a character, numeric, or date
  3701.                          field within a form letter record.  It would
  3702.                          output Jones if Jones were in the LASTNAME field.
  3703.                          Note: if a date field, it outputs the date in the
  3704.                          format May 21, 1986 if entry is 05/21/86.
  3705.           
  3706.           @@Thanks //LASTNAME//.@@ Allows imbedding a CHARACTER FIELD with
  3707.                          a string of text which will print only if the
  3708.                          field is not blank.  It would output Thanks Jones.
  3709.                          if Jones were in the LASTNAME field.
  3710.           
  3711.           
  3712.           
  3713.           
  3714.  
  3715.  
  3716.  
  3717.                                        - 54 -
  3718.  
  3719.  
  3720.  
  3721.  
  3722.  
  3723.  
  3724.           @@Filed.//*FILINGDT//@@  Tests whether a particular character,
  3725.                          numeric, or date field is not blank or whether a
  3726.                          logical field is True.  In either case, if True
  3727.                          the output would be Filed. Otherwise, nothing
  3728.                          would be printed.
  3729.           
  3730.           @@Not filed.//#FILINGDT//@@   Just the opposite of the above.
  3731.                          If the character, numeric, or date field is empty
  3732.                          or if the logical field is False, the expresion is
  3733.                          printed. Otherwise, nothing would be printed.
  3734.           
  3735.           @@A new baby!//?PREGNANT//@@  Similar to above.  Used only with
  3736.                          a logical field.  If logical field is True, the
  3737.                          expression is printed.
  3738.           
  3739.           @@So you're 30.//!AGE=30//@@  Allows any dBASE III expression as
  3740.                          the test for whether the text should be printed. 
  3741.                          If the test is True, the text is printed.  Make
  3742.                          certain that both sides of the expression are of
  3743.                          the same data type.  This example would print
  3744.                          So you're 30! if the AGE numeric field = 30.
  3745.           
  3746.           // AGE=30//    This is the syntax for a GOTO using the WAMPUM
  3747.                          form letter generator.  Note the SPACE at the
  3748.                          beginning of the expression which means, IF the
  3749.                          expression is True, SKIP to the next record
  3750.                          beginning with a SPACE character.  If you want to
  3751.                          skip past a required carriage return record, make
  3752.                          certain that the record begins with a tilde and
  3753.                          not with a SPACE since blank records are assumed
  3754.                          to be those containing all spaces.
  3755.           
  3756.           //+SAMPLE.DOC//     With lengthy pieces of text with no embedded
  3757.                          data, it is often easier to type them into a plain
  3758.                          ASCII document using a text editor.  You then can
  3759.                          merge them into a WAMPUM form letter with the
  3760.                          syntax shown which says read in the SAMPLE.DOC
  3761.                          text file at this point in the form letter.  Note
  3762.                          that this command should appear in a record by
  3763.                          itself with no other text.
  3764.           
  3765.           //=DTOC(DATE())//   There may be times when you just want to
  3766.                          reformat some data directly out of the data base.
  3767.                          The = operand allows this to be done with any
  3768.                          dBASE expression so long as it evaluates to a
  3769.                          STRING EXPRESSION when it is processed.
  3770.           
  3771.           //<#,filename,indexname//  Using the < command allows you to
  3772.                          open up to 5 related data bases from within a 
  3773.                          form letter file.  Replace the pound sign (#) with
  3774.                          a number from 5 through 9. Note that 5 corresponds
  3775.                          to the number of the related data base opened with
  3776.                          the Zoom/Relate File option.  It need not be
  3777.                          reopened.  Paths may be included in identifying
  3778.                          both the filename and the indexname.
  3779.           
  3780.  
  3781.  
  3782.  
  3783.                                        - 55 -
  3784.  
  3785.  
  3786.  
  3787.  
  3788.  
  3789.  
  3790.           //>#,string expression//  Using the > command permits you to do
  3791.                          an indexed SEEK by key value to any record in the
  3792.                          file identified by the number replacing #.  This
  3793.                          numbered file and a corresponding index must
  3794.                          already have been opened using the < command. The
  3795.                          string expression may be the contents of a field
  3796.                          in the primary data base or any dBASE string
  3797.                          expression.  If the name of a field in the primary
  3798.                          data base is used, be sure to precede it with the
  3799.                          ALIAS for the file using the following syntax:
  3800.                          ALIAS->fieldname where ALIAS is the actual file
  3801.                          name of the primary data base and fieldname is the
  3802.                          legal field name of a field in the primary file.
  3803.                          Once the SEEK has been accomplished, any data in
  3804.                          the secondary data base may be extracted using the
  3805.                          = field data expression outlined above and the
  3806.                          ALIAS->fieldname syntax where ALIAS is the name of
  3807.                          the secondary data base file and fieldname is the
  3808.                          name of a field in that file.
  3809.           
  3810.           //FF//         The FF command allows the user to generate a form
  3811.                          feed or page eject from within a form letter file.
  3812.           
  3813.           
  3814.           3.1.11  Building Function Key Macros (KEYS.DBF)
  3815.           
  3816.                As an aid in data entry intensive applications, WAMPUM
  3817.           provides the capability to define up to 39 keyboard macros which
  3818.           may be invoked by the end-user simply by pressing a function key.
  3819.           As is true with WAMPUM applications generally, these keyboard
  3820.           macros are application specific.  This simply means that a set of
  3821.           keyboard macros may be defined for each application in each new
  3822.           directory created on the hard disk.
  3823.           
  3824.                The name of the file which stores the macros is KEYS.DBF
  3825.           which is a standard dBASE III data base file.  It is created
  3826.           automatically whenever WAMPUM is first run in a new subdirectory.
  3827.           To build the table of macro definitions, follow the steps below. 
  3828.           
  3829.                First, select the KEYS.DBF file as the file with which you
  3830.           want to work by picking the F - File Select option on the Main
  3831.           Menu.  Enter the file name KEYS when prompted to do so.  When the
  3832.           Main Menu reappears, the bottom line of the screen should say:
  3833.           
  3834.                                    FILE: KEYS
  3835.           
  3836.                Next, you will want to figure out what keystrokes you want
  3837.           to store under which function keys.  The following function keys
  3838.           are available for use:
  3839.           
  3840.                                    F2 - F10
  3841.                                    Shift F1 - Shift F10
  3842.                                    Ctrl F1 - Ctrl F10
  3843.                                    Alt F1 - Alt F10
  3844.           
  3845.  
  3846.  
  3847.  
  3848.  
  3849.                                        - 56 -
  3850.  
  3851.  
  3852.  
  3853.  
  3854.  
  3855.  
  3856.                You will note that this is all function key combinations
  3857.           except for F1 which is reserved by WAMPUM as the HELP key.
  3858.           
  3859.                Record numbers in the KEYS file match the function keys by
  3860.           key number.  See the table below:
  3861.           
  3862.                          Function Keys            Record Numbers
  3863.                          --------------------     --------------
  3864.                          F2 - F10                 Rec #  2 - 10
  3865.                          Shift F1 - Shift F10     Rec # 11 - 20
  3866.                          Ctrl F1 - Ctrl F10       Rec # 21 - 30
  3867.                          Alt F1 - Alt F10         Rec # 31 - 40
  3868.           
  3869.                Thus, whatever keystrokes are entered in record 5 of the
  3870.           KEYS file will automatically be assigned to function key F5. 
  3871.           Those in record 40 will be assigned to function key ALT-F10.  Any
  3872.           record in the KEYS.DBF file which is blank will be ignored.
  3873.           
  3874.                There are two cardinal rules to remember in entering data in
  3875.           the records of the KEYS file.  (1) Record 1 of the KEYS file is
  3876.           always ignored since it corresponds to the HELP function key, F1.
  3877.           (2)  Every entry in the KEYS file must equate to a CHARACTER
  3878.           STRING when evaluated by WAMPUM.
  3879.           
  3880.                The first rule is only logical.  Since F1 is reserved for
  3881.           HELP, the corresponding record in the KEYS file is ignored. 
  3882.           Whatever is entered in this record won't matter because it is
  3883.           ignored.  Note that you will have to ADD a first record which
  3884.           automatically will be record 1.  Simply press <ENTER> to save it
  3885.           and create record 2 which can be used.
  3886.           
  3887.                The second rule is critical because if it is violated you
  3888.           will get run-time errors the next time WAMPUM is started.  If
  3889.           this happens, simply type I to ignore each error (which means
  3890.           that function key will not be set), then edit the records causing
  3891.           the problems following the steps outlined above.
  3892.           
  3893.                Translated into dBASE III lingo, each record in the KEYS
  3894.           file must be a character string.  If it is simply character data,
  3895.           you meet this requirement by enclosing the data in double or
  3896.           single quotes.  If you have single quotes in the string, then
  3897.           enclose the string in double quotes and vice versa.
  3898.           
  3899.                You can also use dBASE III functions and special WAMPUM
  3900.           functions to create macros so long as the expression evaluates to
  3901.           a string.  Here are a few examples to get you started:
  3902.           
  3903.                DTOC(DATE()) would store today's date as a macro in the
  3904.           following format: 10/10/86.
  3905.           
  3906.                FULLDATE(DATE()) would store today's date as a macro in the
  3907.           following format: October 10, 1986.
  3908.           
  3909.                DTOC(DATE()+30) would store today's date + 30 days.
  3910.           
  3911.  
  3912.  
  3913.  
  3914.  
  3915.                                        - 57 -
  3916.  
  3917.  
  3918.  
  3919.  
  3920.  
  3921.  
  3922.                CDOW(DATE()) would store the day of the week in a macro in
  3923.           the following format: Tuesday.
  3924.           
  3925.                STR(YEAR(DATE()),4) would store the year as a string in the
  3926.           following format: 1986.
  3927.           
  3928.                WEEKDAY(DATE()+30) would store the date 30 days from today
  3929.           rolled over to Monday if it hits on weekend in format: 10/10/86.
  3930.           
  3931.                Again, the important thing to remember is that character
  3932.           text must be enclosed in quotes, and data other than character
  3933.           data must be converted into a string using one of the dBASE III
  3934.           or WAMPUM conversion functions.
  3935.           
  3936.                Finally, these keyboard macros will not take effect until
  3937.           the next time WAMPUM is run from DOS.  They will be loaded on
  3938.           each subsequent running of the program unless changed. Developers
  3939.           should be careful not to store a file named KEYS.DBF in the DOS
  3940.           PATH unless you intend to invoke the macros contained therein
  3941.           whenever an application starts and a file named KEYS.DBF cannot
  3942.           be found in the default directory.
  3943.           
  3944.           
  3945.           3.1.12  Building Edit Checks (EDIT.DBF)
  3946.           
  3947.                As an aid in data entry accuracy, WAMPUM provides the
  3948.           capacity to design custom edit checks for each WAMPUM
  3949.           application.  As was true with keyboard macros, a set of edit
  3950.           checks may be defined for each application in each new directory
  3951.           created on the hard disk.
  3952.           
  3953.                The name of the file which stores the edit checks is
  3954.           EDIT.DBF which is a standard dBASE III data base file.  It is
  3955.           created automatically whenever WAMPUM is first run in a new
  3956.           subdirectory. To build the table of edit checks, follow the steps
  3957.           below. 
  3958.           
  3959.                First, select the EDIT.DBF file as the file with which you
  3960.           want to work by picking the F - File Select option on the Main
  3961.           Menu.  Enter the file name EDIT when prompted to do so.  When the
  3962.           Main Menu reappears, the bottom line of the screen should say:
  3963.           
  3964.                                    FILE: EDIT
  3965.           
  3966.                Next, you will want to figure out what edit checks you want
  3967.           to develop for the particular application.  For some
  3968.           applications, you may want to assure that a data entry field is
  3969.           never left blank.  For others, you may want to assure that a
  3970.           duplicate key is never entered.  Finally, you may want to assure
  3971.           that an entry is contained in a table of valid entries.  None of
  3972.           these checks are possible in dBASE III without substantial custom
  3973.           programming.  WAMPUM provides this capability with a few minutes
  3974.           work. 
  3975.           
  3976.  
  3977.  
  3978.  
  3979.  
  3980.  
  3981.                                        - 58 -
  3982.  
  3983.  
  3984.  
  3985.  
  3986.  
  3987.  
  3988.                The EDIT file structure consists of two fields: EDITTEST and
  3989.           ERRMSG.  The theory behind WAMPUM edit checks is a simple one. 
  3990.           Once you "turn on" the edit checks for use against a particular
  3991.           file, WAMPUM automatically tests newly added records as well as
  3992.           updated existing records to make certain that they do NOT violate
  3993.           any of the error conditions (EDITTESTs) you have specified in the
  3994.           EDIT file. The checks are only run when new records are added to
  3995.           a data base or existing records are changed.  For each error
  3996.           condition identified, WAMPUM will display an error message
  3997.           (ERRMSG) and then permit the end-user to fix the problems.  The
  3998.           end-user cannot SAVE the record with errors without correcting
  3999.           them.  The end-user may <ESC>ape from a data entry screen without
  4000.           invoking WAMPUM's edit checking.
  4001.           
  4002.                Since developers typically work with several files in
  4003.           creating a new application, there are some instances in which you
  4004.           would not want the EDIT CHECKS to occur.  Most importantly, when
  4005.           the primary data base is not being used, you would not want to
  4006.           invoke a series of edit checks designed to check primary data
  4007.           base information.  This is handled in a simple way.  WAMPUM
  4008.           always reads the EDITTEST field entry in the first record of the
  4009.           EDIT.DBF to ascertain the name of the file to be checked.  If
  4010.           this entry does not match IN UPPER CASE the name of the current
  4011.           file in use, the edit checks are turned off.  Stated somewhat
  4012.           differently, the EDITTEST field of Record 1 of EDIT.DBF is
  4013.           reserved to hold the UPPER CASE name of the data base to be edit
  4014.           checked.  Thus, in the case of our example, the entry in Record 1
  4015.           of EDIT.DBF should say ACCOUNTS.  If you forget to enter the name
  4016.           of the data base file to be checked in record 1, then obviously
  4017.           the edit checks specified will never be invoked!
  4018.           
  4019.                There also may be occasions where you want to specify the
  4020.           actual fields to be displayed with BROWSE MODE ON rather than
  4021.           accepting WAMPUM's default which is the first few fields in the
  4022.           actual data base structure.  If you want to specify your own
  4023.           fields, insert the following in the ERRMSG field of Record 1.
  4024.           The first character must be an asterisk (*).  It is followed by
  4025.           the field numbers (from your file structure listing) of the
  4026.           fields you want displayed.  All numbers must be three characters
  4027.           wide and should be padded to the left with spaces.  Three digit
  4028.           numbers should be preceded by a single space. For example, if you
  4029.           want the fields LASTNAME, ACCTNO, and SEX display in BROWSE mode
  4030.           and these are fields 3, 17, and 252 in your data base, the
  4031.           correct syntax would be: *  3 17 252.
  4032.           
  4033.                There are three things to keep in mind in developing your
  4034.           edit checks.  First, edit checks must be dBASE III or WAMPUM
  4035.           expressions which can be evaluated as True or False.  Second, if
  4036.           the expression in EDITTEST is true, the error message in ERRMSG
  4037.           is triggered.  In other words, you are building expressions which
  4038.           identify when an error condition occurs rather than the other way
  4039.           around.  Third, and most importantly, if you wish to evaluate
  4040.           data entered in a particular field, you do NOT use the fieldname
  4041.           to test for an error.  Instead you use the field's sequential
  4042.  
  4043.  
  4044.  
  4045.  
  4046.  
  4047.                                        - 59 -
  4048.  
  4049.  
  4050.  
  4051.  
  4052.  
  4053.  
  4054.           number in the data base in conjunction with an array name
  4055.           FLDDATA[].  The next paragraph will clear up any confusion you
  4056.           are momentarily experiencing.
  4057.           
  4058.                Since you need to know a field's position in the file
  4059.           structure in order to develop edit checks, your first step should
  4060.           be to print out the file structure of the file which will be
  4061.           checked.  Pick the S - Select Utilities option after making
  4062.           certain that the correct file is in use.  Change the List File
  4063.           Structure option to T or Y, then answer Y when prompted for
  4064.           whether the structure should be printed.  This will give you the
  4065.           list of fields in the data base.  Note that the left column shows
  4066.           the field's NUMBER in the structure.  Let us assume that the
  4067.           LASTNAME field is field number 1.  An appropriate edit check to
  4068.           assure that the LASTNAME field was not left blank would read as
  4069.           follows: EMPTY(FLDDATA[1]) or in standard dBASE III parlance, you
  4070.           could say FLDDATA[1]=SPACE(20) assuming the field's width was 20
  4071.           characters.  One of the above entries should be entered as the
  4072.           EDITTEST entry in the EDIT file.  The ERRMSG field entry might
  4073.           say something like this: The LASTNAME field cannot be left
  4074.           BLANK.  Whenever the EDITTEST record evaluates to TRUE, meaning
  4075.           FLDDATA[1] is blank, then the ERRMSG would be displayed.  The
  4076.           important thing to remember is to use FLDDATA[1] and not LASTNAME
  4077.           in identifying the field to be checked!  Note that you also can
  4078.           check one field against another in the same data entry screen. 
  4079.           For example, assume there were two fields in the data base as
  4080.           follows:
  4081.           
  4082.                     1    TRANSCODE      Character      8
  4083.                     2    TRANSDATE      Date           8
  4084.           
  4085.           Let's also assume that the format of the TRANSCODE entries is of
  4086.           the form: 86-12345 where 86 identifies the year of the trans-
  4087.           action. One edit check you probably would want to perform in a
  4088.           situation such as this is to make sure the first two digits of
  4089.           the TRANSCODE matched the year in the TRANSDATE field.  Here is
  4090.           one possible way to handle that:
  4091.           
  4092.                     SUBSTR(FLDDATA[1],1,2)<>SUBSTR(DTOC(FLDDATA[2]),7,2)
  4093.           
  4094.           Note in the example that the relationship must be coded so that
  4095.           when it is TRUE, the error message displays.  Thus, we want to
  4096.           code it in such a way that when the first two characters of the
  4097.           TRANSCODE do not match the year in the TRANSDATE, the expression
  4098.           is True and hence the error message is given.  Note also that the
  4099.           expressions on both sides of the relational operator must be of
  4100.           the same type.  In this case, both are character strings.
  4101.           
  4102.                Finally, it should be noted that these EDIT CHECKS will not
  4103.           take effect until the next time WAMPUM is run with the
  4104.           appropriate file in use.  They will be loaded on each subsequent
  4105.           running of the program unless changed. Developers should be
  4106.           careful not to store a file named EDIT.DBF in the DOS PATH unless
  4107.           you intend to invoke the edit checks contained therein whenever
  4108.           an application is run and a file named EDIT.DBF cannot be found
  4109.           in the default directory.
  4110.  
  4111.  
  4112.  
  4113.                                        - 60 -
  4114.  
  4115.  
  4116.  
  4117.  
  4118.  
  4119.  
  4120.           
  4121.                Beginning with version 2.7 of WAMPUM, several enhancements
  4122.           were added to the EDIT checking module.  WAMPUM now supports both
  4123.           calculated fields through the EDIT process as well as "table
  4124.           lookup" to make certain that a field value appears in a given
  4125.           table of values.
  4126.           
  4127.                               Creating Calculated Fields
  4128.           
  4129.                To automatically calculate the value for a field, that field
  4130.           must be one of the fields in the active data base.  Typically,
  4131.           you would NOT want it to display on a data entry menu since its
  4132.           value will be changed automatically regardless of what the user
  4133.           enters.  This calculation capacity may be used to compute both
  4134.           dates and numeric values and where necessary can also compute
  4135.           values for character and logical fields.  To automatically
  4136.           calculate the value for a field, follow these steps:
  4137.           
  4138.                (1)  In the EDITTEST field, the first character must be the
  4139.           equals sign (=).  This is followed by whatever selection criteria
  4140.           will be used to determine when the calculation IS performed.  If
  4141.           you want it done whenever a record is added or changed, then the
  4142.           EDITTEST field should look like the following:
  4143.           
  4144.                          =.T.
  4145.           
  4146.           WAMPUM keeps track of what mode it is in by setting a variable
  4147.           HELPCODE to the number corresponding to the option picked from
  4148.           the Main System Menu, e.g. A - Add is 1, E - Edit is 2, etc.
  4149.           
  4150.           You may find it helpful to be able to perform calculated field
  4151.           transactions only when the user is in Edit mode or Add mode.  If
  4152.           you only wanted a field calculated when a new record was added,
  4153.           use the following syntax in the EDITTEST field:
  4154.           
  4155.                          =HELPCODE=1
  4156.           
  4157.                (2)  In the ERRMSG field, two codes must be inserted and
  4158.           they are separated by a comma.  The first is the field number
  4159.           corresponding to the field to be calculated.  Then insert a
  4160.           comma.  Then enter any legal dBASE expression to handle the
  4161.           calculation desired.  A simple example may help.
  4162.           
  4163.           Assume that the data base contains a FILINGDT field as #1, a
  4164.           DAYSPEND field as #14, and a CLOSEDT field as #20.  Until a
  4165.           closing date entry has been made, we want the computer to
  4166.           recompute the days pending from the filing date whenever a new
  4167.           record is added or changed.  The field entries should look like
  4168.           the following:
  4169.           
  4170.                     EDITTEST: =EMPTY(FLDDATA[20])
  4171.           
  4172.                     ERRMSG:   14,DATE()-FLDDATA[1]
  4173.           
  4174.           
  4175.           
  4176.  
  4177.  
  4178.  
  4179.                                        - 61 -
  4180.  
  4181.  
  4182.  
  4183.  
  4184.  
  4185.  
  4186.                               Using "Table-Lookup" for Editing
  4187.           
  4188.                "Table lookup" for Editing means the ability of a data base
  4189.           system to refer to a table of values in order to determine
  4190.           whether a value entered by a user is acceptable.  Within WAMPUM,
  4191.           table-lookup is implemented using standard dBASE data bases for
  4192.           the tables.  These data bases may be checked either sequentially
  4193.           or through a Clipper-index file (.NTX) as the developer desires. 
  4194.           To perform "table lookup" as part of the edit checking process,
  4195.           the following rules must be met:
  4196.           
  4197.                (1)  In the EDITTEST field, the first character must be a
  4198.           question mark (?) if a non-indexed dBASE file will be used as the
  4199.           table.  Or two question marks (??) must be used if a dBASE file
  4200.           table will be checked using a Clipper index as the key.  The
  4201.           question mark or marks are followed by whatever selection
  4202.           criteria the developer wants to specify to tell WAMPUM when the
  4203.           table lookup SHOULD be performed.  See the examples above.
  4204.           
  4205.                (2)  In the ERRMSG field, three values must be inserted with
  4206.           a comma between the values.
  4207.           
  4208.                     (a)  The first code is the number of the field to be
  4209.                          checked against the table. Then type a comma.
  4210.           
  4211.                     (b)  The second code is the dBASE file name of the
  4212.                          table to be checked (without the .DBF extension).
  4213.                          Then type a comma.
  4214.           
  4215.                     (c)  The third code is one of two values.  With a non-
  4216.                          indexed table lookup (?), the third code is the
  4217.                          name of the field in the table lookup file to be
  4218.                          compared.  With an indexed table lookup (??), the
  4219.                          third code is the name of the Clipper index file
  4220.                          (without .NTX extension) to use for the lookup.
  4221.           
  4222.           An example may help remove some of the mystery.  Assume your main
  4223.           data base has a field #8 for the user to enter the abbreviation
  4224.           of the STATE where the customer lives.  You want to make sure
  4225.           this entry is, in fact, a state in the United States.  Using
  4226.           WAMPUM, you build another data base with a file name of STATES
  4227.           and an index called ABBREV which holds the two character abbre-
  4228.           viation for each state in the United States.  Your entries would
  4229.           look like the following in the EDIT record:
  4230.           
  4231.                     EDITTEST: ??.T.
  4232.           
  4233.                     ERRMSG:   8,STATES,ABBREV
  4234.           
  4235.           
  4236.                          Using "Table-Lookup" for Calculated Fields
  4237.           
  4238.                Just as a table could be checked to verify data in your data
  4239.           bases, WAMPUM also permits table-lookup to actually calculate the
  4240.           contents of fields in your primary data base.  The table may be
  4241.  
  4242.  
  4243.  
  4244.  
  4245.                                        - 62 -
  4246.  
  4247.  
  4248.  
  4249.  
  4250.  
  4251.  
  4252.           accessed either sequentially or through a Clipper-index file
  4253.           (.NTX) as the developer desires.  To calculate a table follow
  4254.           these simple steps in adding an entry to the EDIT file:
  4255.           
  4256.                (1)  In the EDITTEST field, the first character must be an
  4257.           exclamation point (!) if a non-indexed dBASE file will be used as
  4258.           the table.  Or two exclamation points (!!) must be used if a
  4259.           dBASE file table will be referenced using a Clipper index as the
  4260.           key.  The exclamation point(s) are followed by whatever selection
  4261.           criteria the developer wants to specify to tell WAMPUM when the
  4262.           table lookup calculation SHOULD be performed.  
  4263.           
  4264.                (2)  In the ERRMSG field, five values must be inserted with
  4265.           a comma between the values.
  4266.           
  4267.                     (a)  The first code is the number of the field in the
  4268.                          primary data base to be used to find a match in
  4269.                          the table. Then type a comma.
  4270.           
  4271.           
  4272.                     (b)  The second code is the dBASE file name of the
  4273.                          table to be checked (without the .DBF extension).
  4274.                          Then type a comma.
  4275.           
  4276.                     (c)  The third code is one of two values.  With a non-
  4277.                          indexed table lookup (!), the third code is the
  4278.                          name of the field in the table lookup file to be
  4279.                          compared.  With an indexed table lookup (!!), the
  4280.                          third code is the name of the Clipper index file
  4281.                          (without .NTX extension) to use for the lookup.
  4282.                          Then type a comma.
  4283.           
  4284.                     (d)  The fourth code is the number of the field in the
  4285.                          primary data base to be calculated from the table.
  4286.                          Then type a comma.
  4287.           
  4288.                     (e)  The fifth code is any legal dBASE expression which
  4289.                          specifies the value to be calculated for the field
  4290.                          referenced in (2)(d) above.  This expression would
  4291.                          include references to one or more fields in the
  4292.                          table typically.
  4293.           
  4294.           By way of example, let us assume that a company maintains an
  4295.           ORDERS file with numerous pieces of information being captured
  4296.           about new orders.  Among these are the part number (field #1) and
  4297.           the part cost (field #2).  There also is a table of PARTS which
  4298.           contains the cost of each part (PARTCOST) in the company's
  4299.           inventory.  The developer wants to look up the cost of the part
  4300.           specified in the ORDERS file and insert it automatically into the
  4301.           part cost field in the ORDERS file.  The syntax to do this using
  4302.           a PARTS file indexed on part number would look like this:
  4303.           
  4304.                     EDITTEST: !!.T.
  4305.           
  4306.                     ERRMSG:   1,PARTS,PARTNO,2,PARTCOST
  4307.           
  4308.  
  4309.  
  4310.  
  4311.                                        - 63 -
  4312.  
  4313.  
  4314.  
  4315.  
  4316.  
  4317.  
  4318.           3.1.13  Building Data Entry Menus (MENUS.DBF)
  4319.           
  4320.                Up to 9 customized data entry menus may be built for any
  4321.           given application.  These typically correspond to different
  4322.           stages in the data entry process for a given data base.  In
  4323.           addition to these 9 customized data entry menus, WAMPUM also
  4324.           provides a standard data entry screen which includes access to
  4325.           every field in the current data base.
  4326.           
  4327.                These data entry menus are numbered 0 to 9 with 0 being the
  4328.           default standard menu with access to all fields.  In addition to
  4329.           specifying up to 9 custom menus, the developer may also restrict
  4330.           users without the developer password to a given range of menu
  4331.           numbers.  Thus, some care must be exercised to group the
  4332.           restricted and non-restricted menus into contiguous numbers.  A
  4333.           range of 1 to 5 is permissible, but you cannot allow access to
  4334.           menu 0 as well as menus numbered 2 to 6.
  4335.           
  4336.                Information pertaining to the custom menus is stored in a
  4337.           standard dBASE file named MENUS which is created in the current
  4338.           default directory whenever WAMPUM is first invoked.  Each record
  4339.           in the MENUS file corresponds to a custom menu with the same
  4340.           number.  Thus, record 1 contains information about menu 1, and so
  4341.           on.
  4342.           
  4343.                To build one or more custom menus, first start up WAMPUM in
  4344.           Developer Mode by specifying the developer password after the
  4345.           word WAMPUM.  Make certain that the File in Use at the bottom of
  4346.           the screen is the one for which you want to build the custom
  4347.           menus.  If so, choose S - Select Utilities and change the List
  4348.           File Structure field entry to T.  Then <PgDn> and print the file
  4349.           structure for reference. 
  4350.           
  4351.                When the Main System Menu reappears, pick F - File Select
  4352.           and enter the file name of MENUS. Press <ENTER> and WAMPUM will
  4353.           open the MENUS file.  When the Main System Menu reappears, make
  4354.           sure the bottom line of the screen shows the file name MENUS.
  4355.           
  4356.                To ADD a new custom menu, pick A - Add Records from the Main
  4357.           System Menu. A blank record will appear with two fields: MENUNAME
  4358.           and FLDLIST.  As the name suggests, MENUNAME is whatever name you
  4359.           want to assign to this custom menu, e.g. CASE OPENING MENU. Enter
  4360.           the title desired and press <ENTER> to move to the FLDLIST field.
  4361.           
  4362.                In FLDLIST, you specify the field numbers corresponding to
  4363.           the fields you want displayed on the data entry screen.  The
  4364.           sequence used to specify the numbers does not matter since the
  4365.           fields always are ordered according to their numeric position in
  4366.           the data base structure.  The format for these field numbers is
  4367.           CRITICAL! 
  4368.           
  4369.                Rule 1: Each field number must be AT LEAST 3 characters in
  4370.           length with spaces to the left of the number to "pad" it to 3
  4371.           characters. For example, field 1 would require that you type two
  4372.           spaces and then the number 1.  27 would require one leading space
  4373.           and then the number 27.  
  4374.  
  4375.  
  4376.  
  4377.                                        - 64 -
  4378.  
  4379.  
  4380.  
  4381.  
  4382.  
  4383.  
  4384.           
  4385.                Rule 2: Each field number must be preceded by at least one
  4386.           space. Thus, field 106 would require a space then the number 106.
  4387.           
  4388.                Rule 3: As many fields may be specified as will fit within
  4389.           the FLDLIST field observing the two rules above.  For example, to
  4390.           create a data entry menu with fields 1, 7, 21, and 107, FLDLIST
  4391.           should look like the following without the quotation marks which
  4392.           have been included only to assist in showing the spaces:
  4393.           
  4394.                               "  1  7 21 107"
  4395.           
  4396.                Once the FLDLIST field has been specified, press CTRL-W or
  4397.           <PgDn> to save the entry.  A new blank record will appear.  You
  4398.           may continue to add menus or <ESC> to exit to the Main System
  4399.           Menu.
  4400.           
  4401.                Once the Main System Menu reappears, press <ESC>ape to exit
  4402.           to DOS.  Then restart WAMPUM in Developer Mode again.  When the
  4403.           Main System Menu appears, pick S - Select Utilities and mark the
  4404.           Change Current Menu field as T and <PgDn>.
  4405.           
  4406.                In Developer Mode, three fields will appear below the list
  4407.           of available menus:
  4408.           
  4409.                          (1)  Number of current menu to use
  4410.           
  4411.                          (2)  Minimum menu number
  4412.           
  4413.                          (3)  Maximum menu number
  4414.           
  4415.                For now, press <ENTER> to skip through the current menu
  4416.           field.  Then enter a value for the minimum menu number and the
  4417.           maximum which corresponds to the menus you have created and to
  4418.           which you want the users to have access.  Remember that if the
  4419.           minimum number is 0, users will be able to access and change
  4420.           every field in the data base!  Make certain that BOTH the minimum
  4421.           menu number and the maximum menu number do NOT exceed the value
  4422.           of the last record in the MENUS file.  The minimum and maximum
  4423.           menu numbers may be the same number so long as the rule above is
  4424.           not violated.
  4425.           
  4426.                Once you have entered these values <PgDn> if necessary to
  4427.           return to the Main System Menu.  Now access the Menu Selection
  4428.           screen again by choosing S - Select Utilities, then mark Change
  4429.           Current Menu true, then <PgDn>.  The correct range of menu
  4430.           choices should now be displayed.  Now set the value for the
  4431.           current menu to use and <PgDn> to return to the Main System Menu.
  4432.           Now you may SAVE this new configuration by selecting the option 
  4433.           G - Configuration Update then pressing <ENTER>.
  4434.           
  4435.                You now are ready to test the application.  <ESC>ape to DOS
  4436.           and restart WAMPUM in user mode.  Select the A - Add Records
  4437.           option and make certain that the correct menu displays.  Press
  4438.           <ESC>ape.  Now choose S - Select Utilities and mark Change
  4439.           Current Menu true and <PgDn>.  The correct range of menus should
  4440.  
  4441.  
  4442.  
  4443.                                        - 65 -
  4444.  
  4445.  
  4446.  
  4447.  
  4448.  
  4449.  
  4450.           appear, and you should only be able to enter a number in the
  4451.           range specified.  If not, restart WAMPUM in Developer Mode and
  4452.           change the ranges following the steps outlined above.
  4453.           
  4454.           
  4455.           3.1.14  Building an Audit Trail File (AUDIT.DBF)
  4456.           
  4457.                For a variety of reasons, it may be desirable to create an
  4458.           audit trail of all data added or changed in a data base.  This
  4459.           can be done as a means of verifying the accuracy of data posted
  4460.           to the data base.  Or it can be done in multi-user environments
  4461.           to provide update integrity to the master data base while many
  4462.           users share access to a copy of the data base from the previous
  4463.           day.  In the latter instance, the audit trail serves as a
  4464.           transaction log of new entries to the master data base.  These
  4465.           transaction logs can be built using numerous workstatios.  Then
  4466.           at the end of the day all of the new transactions can be posted
  4467.           to the master data base using WAMPUM's Copy Utilities.  
  4468.            
  4469.                To invoke the AUDIT TRAIL/TRANSACTION LOGGING feature of
  4470.           WAMPUM, you must be using version 2.9 or later of the software.
  4471.           You must assure that some field in your data base has unique
  4472.           values and is indexed before implementing transaction logging.
  4473.           This index must be set as the PRIMARY INDEX before executing a
  4474.           configuration update.  Then select the G - Config Update option
  4475.           and change the Enable Audit Trail? prompt to True.  Thereafter,
  4476.           WAMPUM will automatically create an AUDIT.DBF file in which it
  4477.           will post any changes to the current data base using the index
  4478.           which was the current index at the time of configuration update
  4479.           as the key field in the event later transaction log posting is
  4480.           desired.
  4481.           
  4482.                It is the developer's responsibility to assure that the
  4483.           AUDIT.DBF file is periodically purged since it will continue to
  4484.           grow indefinitely until the Enable Audit Trail prompt is turned
  4485.           back off by setting it false.  Purging consists of deleting
  4486.           AUDIT.DBF and AUDIT.DBT from the current application directory
  4487.           with the following commands:
  4488.           
  4489.                          CD \{current application directory}
  4490.                          DEL AUDIT.*
  4491.           
  4492.                Once these files are deleted, WAMPUM will recreate them the
  4493.           next time WAMPUM is run in this directory.  See the section of
  4494.           the User's Guide which addresses the COPY UTILITIES for infor-
  4495.           mation on posting transactions to the master data base from an
  4496.           audit trail file.
  4497.           
  4498.           
  4499.           3.1.15  Preformatted Output (WAMPUM.DBF)
  4500.           
  4501.           3.1.15.1  Overview
  4502.           
  4503.                WAMPUM PreFormatted Output is the feature for which many
  4504.           dBASE users have clamored for years.  It is nothing more than a
  4505.           tool by which a developer can "hard-code" ALL required components
  4506.  
  4507.  
  4508.  
  4509.                                        - 66 -
  4510.  
  4511.  
  4512.  
  4513.  
  4514.  
  4515.  
  4516.           of a report, label, or form letter process in advance.  Stated
  4517.           differently, it frees the end-user from having to specify which
  4518.           records should be printed and in what order every time a report
  4519.           is run.  How is this magic performed?  Very simply.  For each new
  4520.           application you develop, WAMPUM will create a separate data base
  4521.           file, WAMPUM.DBF, which stores up to 80 preformatted reports,
  4522.           labels, and form letters.  The end user then can call up a list
  4523.           of these preformatted output choices and mark the ones desired as
  4524.           True.  These then are produced automatically with no further user
  4525.           intervention.
  4526.           
  4527.           
  4528.           3.1.15.2  Building the WAMPUM File
  4529.           
  4530.                The first step in developing WAMPUM Preformatted Output is
  4531.           to create the WAMPUM.DBF file to store the information.  This is
  4532.           done by selecting W - WAMPUM PreFormatted Output from the Main
  4533.           System Menu.  When WAMPUM asks whether to create the WAMPUM file,
  4534.           respond with either T or Y to create the empty data base.
  4535.           
  4536.           
  4537.           3.1.15.3  Adding/Editing the WAMPUM File
  4538.           
  4539.                Building preformatted output is much like adding and editing
  4540.           data in any other .DBF file.  First, pick the F - File Select
  4541.           option from the Main System Menu, and enter WAMPUM as the name of
  4542.           the data base to use.
  4543.           
  4544.                When the Main System Menu returns, the bottom of the screen
  4545.           should show the file in use with the message: FILE: WAMPUM. 
  4546.           
  4547.                To create a new entry in the file, select the A - ADD record
  4548.           option.  To change an existing entry, select E - EDIT record.
  4549.           
  4550.                When the data entry screen appears, you will be prompted for
  4551.           the following items of information concerning the report, label,
  4552.           or form letter you wish to preformat:
  4553.           
  4554.                DATAFILE -  Enter the name of the primary data file which
  4555.                          will be used in producing the output.  Do NOT
  4556.                          include the .DBF file extension.
  4557.           
  4558.                SORTINDX -  If you want the output sorted in a particular
  4559.                          order, then you may specify the sort index by
  4560.                          entering the name of index file.  Do NOT enter the
  4561.                          .NTX file extension.  If this field is left blank,
  4562.                          the output will be produced in the actual order of
  4563.                          the records in the primary data base.
  4564.           
  4565.                RPTLBLFRM - Enter either R, L, or F to tell WAMPUM whether
  4566.                          the output will be a report (.FRM file), label
  4567.                          (.LBL file), or form letter (.DBF file).
  4568.           
  4569.                OUTFILE - Enter the name of the actual report form, label
  4570.                          format, or form letter file.  Do NOT include the
  4571.                          file extension.
  4572.  
  4573.  
  4574.  
  4575.                                        - 67 -
  4576.  
  4577.  
  4578.  
  4579.  
  4580.  
  4581.  
  4582.           
  4583.                FONT - Enter a number between 0 and 9 to identify which FONT
  4584.                          will be used in generating the output.  See the
  4585.                          section on Printer Configuration for more info.
  4586.           
  4587.                CRITERIA -  Enter the selection criteria just as they would
  4588.                          be entered in the Select Utilities option
  4589.                          previously discussed.  Note that there is one
  4590.                          enhancement.  If there is a particular range of
  4591.                          dates you want to prompt for at execution time,
  4592.                          then you can specify the field to which the date
  4593.                          range will apply by surrounding that field with
  4594.                          //'s.  For example, suppose you were generating a
  4595.                          report which would show new job applications
  4596.                          received for a certain period of time.  If the
  4597.                          field name storing the application date was
  4598.                          APPLICDT, then the following syntax in the
  4599.                          criteria would allow the user to enter a date
  4600.                          range at run time for the application date:
  4601.                          //APPLICDT//.
  4602.           
  4603.                DESCRIP -  Enter a brief description for the output you just
  4604.                          designed.  This is what will appear on the menu
  4605.                          when the user selects WAMPUM Preformatted Output.
  4606.           
  4607.                RELFILE1 -  Enter the file name of the file to be related to
  4608.                          the primary data base when the output is run.  See
  4609.                          the section on Z - Zoom/Relate File for more info.
  4610.           
  4611.                RELINDX1 -  Enter the file name of the index to be used in
  4612.                          relating the secondary file to a field in the
  4613.                          primary file.  See Z - Zoom/Relate File for info.
  4614.           
  4615.                Once all of the above entries have been made, a new record
  4616.           is stored in the WAMPUM.DBF file.  When you have added all of the
  4617.           entries desired.  Exit from  WAMPUM by pressing <ESC> from the
  4618.           Main System Menu.  Then restart WAMPUM and select the W option to
  4619.           try out your new output.
  4620.           
  4621.           
  4622.           3.1.16  Resetting the Developer Password
  4623.           
  4624.                Beginning with version 2.2, WAMPUM provides the capability
  4625.           to reset the developer password from VOODOO to some other
  4626.           password of your choice.  This is done using the DOS ENVIRONMENT
  4627.           and the SET command.  To reset the password, you should insert a
  4628.           line such as what appears below in the AUTOEXEC.BAT file in the
  4629.           root directory of the hard disk which will be used to boot the
  4630.           system.
  4631.           
  4632.                          SET WAMPUM=MOVOODOO
  4633.           
  4634.  
  4635.  
  4636.  
  4637.  
  4638.  
  4639.  
  4640.  
  4641.                                        - 68 -
  4642.  
  4643.  
  4644.  
  4645.  
  4646.  
  4647.  
  4648.                The value of the WAMPUM environment variable beginning with
  4649.           the THIRD character becomes the new developer password when the
  4650.           system is restarted.  In the case outlined above, the password
  4651.           still would be VOODOO since the first and second characters are
  4652.           ignored.
  4653.           
  4654.                Note that this is anything but a secure system.  What it
  4655.           will do is keep the casual or novice user from entering WAMPUM in
  4656.           developer mode accidentally.
  4657.           
  4658.           
  4659.           3.1.17  Network Considerations
  4660.           
  4661.                Multi-user data base access via NETBIOS-compatible networks
  4662.           adds a whole new dimension to WAMPUM applications. Considerations
  4663.           such as security, passwords, audit trails, record and file
  4664.           locking are but a few of the new worries you will face.
  4665.           
  4666.                The best advice for those just getting started is START
  4667.           SMALL.  A few users sharing a simple data base is the best way to
  4668.           get a feel for networks.  WAMPUM provides a margin of security
  4669.           and reliable record and file locking.  Because of the nature of
  4670.           DOS and the computers which run under DOS, WAMPUM is NOT and
  4671.           CANNOT take the place of the mainframe at your local department
  4672.           store.
  4673.           
  4674.                For many network applications, you may not need WAMPUM to
  4675.           impose password security.  If you don't need it, DON'T USE IT!
  4676.           If you do need it, include a line in your AUTOEXEC.BAT file for
  4677.           each computer on the network which says: SET USERID=X.  Instead
  4678.           of X, you may assign each user a name if you so desire.  Then in
  4679.           a separate subdirectory, run WAMPUM and build a new file called
  4680.           USERS with two character fields of 8 characters each.  The field
  4681.           names must be USER and PASSWORD.  If desired, you may add a third
  4682.           field named SUPERVISOR which must be a logical field.  Once you
  4683.           have created the data base, build an index named USER on the USER
  4684.           field.  Then add records to the file for each user on the network
  4685.           giving each user a secret password.  If you included the
  4686.           SUPERVISOR field, mark it True for those who should have access
  4687.           to WAMPUM in Developer Mode.  When you finish adding all records,
  4688.           exit to DOS and copy both USERS.DBF and USER.NTX into a directory
  4689.           which is part of the DOS PATH.  Thereafter, whenever any user
  4690.           runs WAMPUM, he or she will be prompted for a USER NAME and
  4691.           PASSWORD which must be in the file you created.  If you decide
  4692.           you no longer wish to require USER NAMES and PASSWORDs, simply
  4693.           delete the SET USERID line from the AUTOEXEC.BAT file for those
  4694.           particular network users.
  4695.           
  4696.                Another consideration of which you should be aware is that
  4697.           Clipper, while permitting read access to an entire file while
  4698.           records in that file are locked, nevertheless imposes a file lock
  4699.           whenever an indexed SEEK is underway.  This typically is only for
  4700.           a moment; however, if you run reports against voluminous data
  4701.           bases in which only a few records will qualify for the report,
  4702.           you should be aware that the file will be locked up if you are
  4703.           using an active index during the periods spent searching for
  4704.  
  4705.  
  4706.  
  4707.                                        - 69 -
  4708.  
  4709.  
  4710.  
  4711.  
  4712.  
  4713.  
  4714.           individual qualifying records in the data base.  The file will be
  4715.           unlocked momentarily as each record for the report is found. 
  4716.           This may or may not be palatible in a high volume data entry
  4717.           environment.  In such environments, you may wish to consider
  4718.           running reports against a duplicate of the data base and indexes
  4719.           or you may wish to run reports during periods in which data entry
  4720.           is not critical, i.e. bedtime.
  4721.           
  4722.           
  4723.           3.1.18  Making a Backup of the User Application
  4724.           
  4725.                Once you have completed building a new application in its
  4726.           own subdirectory, this then can be saved using the BACKUP command
  4727.           for subsequent use by end-users.  When the application is
  4728.           completed, simply type the following command substituting the
  4729.           name of the SUBDIRECTORY in which you built the application for
  4730.           the word SUBDIR below.  If you are using a drive other than Drive
  4731.           C, you would want to change the C: as well.
  4732.           
  4733.                     BACKUP C:\SUBDIR\*.* A:
  4734.           
  4735.                This will make a copy of the application on a formatted
  4736.           floppy in Drive A.
  4737.           
  4738.                The end user then can take this floppy and restore it to the
  4739.           system on which it will be run with the command:
  4740.           
  4741.                     RESTORE A: C:\*.* /S
  4742.           
  4743.                The DOS Restore command automatically will construct the new
  4744.           subdirectory on their hard disk and then copy the application
  4745.           without any user knowledge of file copying.
  4746.           
  4747.           
  4748.           3.1.19  Writing the Documentation
  4749.           
  4750.                Perhaps the most important step in building a new
  4751.           application is to write some documentation explaining what the
  4752.           system does and how to use it.  For ease of use, the WAMPUM
  4753.           User's Guide has been paginated in such a way that the end-user
  4754.           section can be extracted and used as the first section of your
  4755.           completed documentation for any new application.  Don't
  4756.           distribute new applications without documentation!  It gives
  4757.           WAMPUM and yourself a bad name.
  4758.           
  4759.           
  4760.           3.2   ! - RUNning an External Program
  4761.           
  4762.                Assuming you have sufficient memory, external programs can
  4763.           be run from within WAMPUM using the !- Run External Program
  4764.           option on the Main System Menu.  The following programs can be
  4765.           run: executable programs in either .EXE or .COM format and DOS
  4766.           batch files with .BAT file extension.  In addition, you can exit
  4767.           to the DOS level temporarily by entering \COMMAND.COM as the file
  4768.           name to run.  Note, this only works with DOS 3.0 and above. 
  4769.  
  4770.  
  4771.  
  4772.  
  4773.                                        - 70 -
  4774.  
  4775.  
  4776.  
  4777.  
  4778.  
  4779.  
  4780.           Similarly, directory paths may precede program names with DOS 3.0
  4781.           or above.  Any program within the DOS PATH may be run without
  4782.           specifying the directory path.
  4783.           
  4784.           
  4785.           3.3   Z - ZOOMing or RELATing a Supplemental File
  4786.           
  4787.                WAMPUM provides the capability to link a secondary file for
  4788.           purposes of report, label, and form letter output.  This can be
  4789.           done automatically within the WAMPUM Preformatted Output option,
  4790.           or it can be done manually using the Z - Zoom/Relate File option.
  4791.           
  4792.                There are many instances in which it is helpful to have a
  4793.           secondary file to provide "table lookup" of data which otherwise
  4794.           would have to be retyped in each record of a data base.  For
  4795.           example, if each customer has an ACCOUNT NUMBER, it would be
  4796.           silly to build an orders file which required the entry of the
  4797.           customer's name, address, and phone number every time an order
  4798.           was placed.  Instead, the orders file could contain the customer
  4799.           number, and a secondary file could be used to "look up" the
  4800.           customer's name, address, and phone number whenever a report,
  4801.           label, or form letter was produced.
  4802.           
  4803.                There are four prerequisites for relating a secondary file
  4804.           with WAMPUM.  (1)  There must be an IDENTICAL field in both the
  4805.           main data base and the related file; (2) the key field in the
  4806.           related file must be indexed on that key; (3) the index file name
  4807.           must be identical to the name of the key field; and (4) both the
  4808.           related file and its index must either be in the default
  4809.           directory or must be accessible via the DOS PATH.
  4810.           
  4811.                To link a secondary file, pick the Z - Zoom/Relate File
  4812.           option on the Main System menu.  Then enter the name of the
  4813.           secondary file and the index.  When the Main System Menu
  4814.           reappears, the last line of the screen will show a relation is in
  4815.           effect with the following expression:
  4816.           
  4817.                               FILE: ORDERS/R
  4818.           
  4819.                Fields in the related file may then be accessed within
  4820.           report and label forms as well as within form letter files using
  4821.           the following syntax: ALIAS->FIELDNAME where ALIAS is the name of
  4822.           the related file and FIELDNAME is the field name to be output.
  4823.           
  4824.                See the example below for further clarification:
  4825.           
  4826.           CUSTOMER ORDER FILE (ORDERS.DBF)   CUSTOMER FILE (ACCOUNTS.DBF)
  4827.           --------------------------------   ----------------------------
  4828.           
  4829.                ACCTNO    ---- RELATED FIELD --->       ACCTNO   (INDEXED) 
  4830.                
  4831.                ORDERDT                                 CUSTNAME
  4832.           
  4833.                ITEMS                                   ADDRESS
  4834.           
  4835.                                                        PHONE
  4836.  
  4837.  
  4838.  
  4839.                                        - 71 -
  4840.  
  4841.  
  4842.  
  4843.  
  4844.  
  4845.  
  4846.           
  4847.                As a FIELD CONTENTS entry in the report form, you could then
  4848.           specify  ACCOUNTS->CUSTNAME once the ACCOUNTS file was related
  4849.           using the ACCTNO index.  This would tell WAMPUM to output the
  4850.           actual customer name rather than the account number found in the
  4851.           orders file.
  4852.           
  4853.           
  4854.           3.4   G - Global Replacement of Data 
  4855.           
  4856.                There are occasions in which it is desirable to replace
  4857.           different pieces of data in a file for a large number of records
  4858.           in one pass rather than calling up each record individually. 
  4859.           
  4860.                WARNING: Be aware that the potential for disaster goes up
  4861.           dramatically any time you are replacing data simultaneously for
  4862.           more than one record!  If you are new to WAMPUM and particularly
  4863.           to the power of dBASE III's REPLACE command, STAY AWAY FROM THIS
  4864.           OPTION! This feature has been added to WAMPUM against my better
  4865.           judgment because of the pleas of many experienced dBASE users.  I
  4866.           fear that the howls from mistakes may far outweigh the benefits. 
  4867.           If you do not need the temptation of this option, delete item 18
  4868.           from the Menu # list when you configure new WAMPUM applications!
  4869.           
  4870.                G - Global Replace is a function closely akin to global
  4871.           search and replace on many word processing systems.  It involves
  4872.           (1) selecting a group of records to be processed and then (2)
  4873.           revising one or more fields of data in the records which meet the
  4874.           selection criteria.
  4875.           
  4876.                If you already have entered Selection Criteria, then
  4877.           executing G - Global Replace always works with the group of
  4878.           records meeting those search criteria.  If you have not already
  4879.           entered Selection Criteria, then selecting G - Global Replace
  4880.           always triggers WAMPUM's Select Assist first.  You must enter
  4881.           selection criteria before Global Replace will work.  You are well
  4882.           advised to run a list using the Select Criteria you have in mind
  4883.           for Global Replace to make sure the correct records have been
  4884.           selected.  Once Global Replace has been executed, it's too late
  4885.           to get them back!  See the Select Utilities section of the User's
  4886.           Guide for more details.
  4887.           
  4888.                Once record selection criteria are in effect, G - Global
  4889.           Replace will display the Global Replace Screen which permits you
  4890.           to specify up to 10 different fields which can be updated in one
  4891.           pass through the data base.  For each field, you specify two
  4892.           pieces of information: (1) the field name and (2) the dBASE
  4893.           string expression to be executed against that piece of data.
  4894.           
  4895.                In its simplest form, you may wish to replace all DUE DATES
  4896.           with a new value 30 days later than the existing date.  Assuming
  4897.           you already have selected the range of records to be changed, the
  4898.           correct procedure would be to use the <Up> or <Down> arrow to
  4899.           first find the DUEDT field.  Once displayed, press <ENTER>.  When
  4900.           prompted for the string expression, enter the following:
  4901.  
  4902.  
  4903.  
  4904.  
  4905.                                        - 72 -
  4906.  
  4907.  
  4908.  
  4909.  
  4910.  
  4911.  
  4912.           DUEDT+30.  Then press <ENTER>.  If there is another field to be
  4913.           replaced, you would leave the LINK in the AND display and press
  4914.           <ENTER>.  A second line would permit you to repeat the above
  4915.           process for another piece of information.  When finished, simply
  4916.           press <PgDn> while the cursor is in the LINK field and the global
  4917.           search and replace will proceed.  If you have made a mistake,
  4918.           press <ESC> to exit without executing the global replace!
  4919.           
  4920.                If a group of last names had been entered in upper and lower
  4921.           case and you wanted to convert them to ALL UPPER CASE, you would
  4922.           first specify the group of records to be processed using SELECT
  4923.           ASSIST.  Then, when the GLOBAL REPLACE SCREEN appears, find the
  4924.           LASTNAME field, press <ENTER>, type UPPER(LASTNAME) for the field
  4925.           expression, press <ENTER>, and <PgDn> to proceed.
  4926.           
  4927.                If a last name of a customer changed from JONES to JOHNSON
  4928.           (and you're sure using Select Assist that you have narrowed down
  4929.           the group of records to the correct JONES only), then, when the
  4930.           GLOBAL REPLACE SCREEN appears, find the LASTNAME field, press
  4931.           <ENTER>, type "JOHNSON" for the field expression, press <ENTER>,
  4932.           and <PgDn> to proceed.
  4933.           
  4934.                MORAL:  Always RUN A LIST against your existing SELECTION
  4935.           CRTIERIA to make certain that only the desired records will be
  4936.           REPLACED before executing G - Global Replace.  If you're new to
  4937.           WAMPUM and data base management, make a full backup of your data
  4938.           base application before using this option! Don't say you haven't
  4939.           been warned!
  4940.           
  4941.           
  4942.           3.5   C - Copy Utilities for Importing & Exporting Data
  4943.           
  4944.                WAMPUM's C - Copy Utilities option provides a rich variety
  4945.           of file importing and exporting tools permitting standard dBASE
  4946.           data bases to be transferred into or out of virtually all of the
  4947.           common file formats.  In addition, a data base structure file can
  4948.           be created which permits simple revision of a data base structure
  4949.           where additional fields become desirable after an application has
  4950.           been built. With the exception of the dBASE III structure and
  4951.           audit trail  options, you can narrow down which records will be
  4952.           copied by first specifying selection criteria using the S -
  4953.           Select Utilities option.  You will be prompted whether to
  4954.           override the selection.
  4955.           
  4956.                When the C - Copy Utilities option is selected, you
  4957.           initially are prompted for three pieces of information:  (1)
  4958.           whether you will be COPYing data TO or FROM another file from the
  4959.           file currently in use; (2) the file type of the other file; and
  4960.           (3) the file name of the other file.
  4961.           
  4962.                Copying TO Another File requires that the first prompt be
  4963.           answered with a T.  Then a file type is specified. And then the
  4964.           file name of the receiving file is specified.  
  4965.           
  4966.  
  4967.  
  4968.  
  4969.  
  4970.  
  4971.                                        - 73 -
  4972.  
  4973.  
  4974.  
  4975.  
  4976.  
  4977.  
  4978.                If you specify a dBASE III type data base file as the
  4979.           receiving file, then one will be created if the file name
  4980.           specified does not already exist.  If it exists, you will be
  4981.           asked whether to Abort, Overwrite, or Append to the existing
  4982.           external file.
  4983.           
  4984.                If you specify COPY TO a dBASE III Structure, WAMPUM will
  4985.           copy the structure of the current data base into a new .DBF file
  4986.           with four fields: Field_Name, Field_Type, Field_Len, and
  4987.           Field_Dec.  Each record entry in the new file will match a field
  4988.           in the structure of the current data base.  This file then can be
  4989.           added to, edited, records can be deleted, etc.  Once revised,
  4990.           this file then can be used as the new file structure template for
  4991.           transferring the current data base into a new file structure. 
  4992.           This is covered in detail below.
  4993.           
  4994.                If you COPY TO a Standard Data Format file, WAMPUM will
  4995.           create a new flat file consisting of all the selected data in the
  4996.           current data base in ASCII format.  Each record will occupy one
  4997.           line in the new file with a carriage return/line feed at the end
  4998.           of the line.
  4999.           
  5000.                COPYing TO a Delimited Format file permits the user to
  5001.           identify what character should be used to surround each character
  5002.           field in the new data base.  For example, BASIC expects character
  5003.           fields in a sequential file to be delimited with QUOTES.
  5004.           
  5005.                COPYing TO an Audit Trail file is never permissible.  You
  5006.           may edit the AUDIT file just as you would edit any other file.
  5007.           
  5008.                COPYing TO an Empty dBASE III file makes a duplicate empty
  5009.           data base file with the same file structure as the current file
  5010.           in use.
  5011.           
  5012.                Copying From Another File means that you will be IMPORTING
  5013.           data from another file INTO the data base file currently in use. 
  5014.           The only exception is the dBASE III Structure option covered
  5015.           below.  To COPY FROM another file, enter F at the To/From prompt.
  5016.             
  5017.                If you COPY FROM another dBASE III data base, then the
  5018.           information in ALL records in that data base will be appended to
  5019.           the data already in the current data base.  Only field data whose
  5020.           field names and type match exactly those of the current data base
  5021.           will be copied.  Existing records in the current data base will
  5022.           not be deleted.
  5023.           
  5024.                If you COPY FROM a Standard Data Format file, its records
  5025.           are appended to the information, if any, which already exists in
  5026.           the current data base.  Note that the current dBASE III file
  5027.           structure should be created first to match the format of the SDF
  5028.           file.  If you don't understand this, obtain a good dBASE III
  5029.           Primer before attempting to use this option or the next one.
  5030.           
  5031.  
  5032.  
  5033.  
  5034.  
  5035.  
  5036.  
  5037.                                        - 74 -
  5038.  
  5039.  
  5040.  
  5041.  
  5042.  
  5043.  
  5044.                If you COPY FROM a Delimited file, its records are appended
  5045.           to the information, if any, which already exists in the current
  5046.           data base.  Note that the current dBASE III file structure should
  5047.           be created first to match the format of the delimited file.
  5048.           
  5049.                COPYING FROM a dBASE III Structure is WAMPUM's way of
  5050.           allowing you to modify the structure of the current data base and
  5051.           move the file contents to a new dBASE III file.  To modify a
  5052.           file's structure, follow the steps outlined above to create and
  5053.           revise a new dBASE III structure file.  Once completed, place the
  5054.           original dBASE III data base file back in use with F - File
  5055.           Select. Then pick the COPY FROM option and specify option 2, a
  5056.           dBASE III Structure.  Enter the name of the structure file as the
  5057.           external file.  You then will be prompted to enter a name for a
  5058.           new dBASE III data base file to be built using the new structure
  5059.           and the data from the data base file currently in use.  Enter a
  5060.           name of your choice and press <ENTER>.  Once completed, place the
  5061.           new file in use and check the data to assure that it copied what
  5062.           you intended before deleting the old data base!  Once you are
  5063.           certain that it looks the way it should, you should reindex the
  5064.           file following the instructions in the I - Index Select/Create
  5065.           section of this User's Guide.  You then can delete the original
  5066.           data base preferably after making a backup copy to a floppy.
  5067.           
  5068.                COPYING FROM an Audit Trail file is WAMPUM's way of allowing
  5069.           posting from a transaction file.  To use this option requires
  5070.           version 2.9 or later of WAMPUM.  In addition, the developer must
  5071.           have set the AUDIT TRAIL flag True for this application when the
  5072.           G - Config Update option was run. And, the audit flag must be set
  5073.           to False before posting to the master data base begins.  Assuming
  5074.           the above conditions have been met, a file will exist in the
  5075.           default directory named AUDIT.DBF.  This should be entered as the
  5076.           external file name or simply enter the drive designator
  5077.           indicating the drive location of the AUDIT files, e.g. C: or A:
  5078.           with a floppy.  For the transaction posting to work, the current
  5079.           file and lead index must match the file and lead index designated
  5080.           when the audit trail file was created.  Otherwise, an error
  5081.           message will be given indicating what the required file and index
  5082.           must be.  If no error condition is present, then WAMPUM will post
  5083.           all information in the audit file to the current data base and
  5084.           will notify the user when this has been completed.  Remember that
  5085.           the values in the lead index must be unique or the AUDIT file
  5086.           will be posted to the first matching key found in the index. Note
  5087.           also that this function is accessible only to users with the
  5088.           developer password.
  5089.           
  5090.           
  5091.           3.6   Deleting & Undeleting Groups of Records
  5092.           
  5093.                WAMPUM provides a means of marking a group of records as
  5094.           DELETED as well as a means of restoring a group of records which
  5095.           already have been marked for deletion.  To use this function, you
  5096.           must start WAMPUM with the Developer Password!  You also must
  5097.           have specified Record Selection Criteria, and there must be a
  5098.           primary index which evaluates to a character expression.  If any
  5099.  
  5100.  
  5101.  
  5102.  
  5103.                                        - 75 -
  5104.  
  5105.  
  5106.  
  5107.  
  5108.  
  5109.  
  5110.           of these three prerequisites is missing, WAMPUM ignores the
  5111.           attempt to delete or undelete a group of records just as if the
  5112.           function did not exist.
  5113.           
  5114.                Once the above prerequisites have been satisfied, you
  5115.           should first run a sample listing using the List File
  5116.           Contents option in the S - Select Utilities.  This will assure
  5117.           that you are working with the group of records desired.
  5118.           
  5119.                Next, pick the function desired: either M - Mark Records
  5120.           *DEL* or U - UN*DEL* Records.  When WAMPUM prompts for the entry
  5121.           to find, type an asterisk (*) and press <ENTER>.  If the
  5122.           prerequisites in the first paragraph have been met, WAMPUM will
  5123.           ask if you really want to DELETE or RESTORE the selected group of
  5124.           records.  Type Y if you want to proceed, or press <ESC> to abort.
  5125.           
  5126.                This function provides a quick way to mark a large group of
  5127.           records deleted once the same group of records has been archived
  5128.           to a different file.  When the X - Rebuild/FileFix option is then
  5129.           run, the group of records is deleted permanently and cannot be
  5130.           restored with the U - UN*DEL* Records function.
  5131.           
  5132.                Note that this function requires an active Record Selection
  5133.           Criteria expression to avoid the possibility of marking every
  5134.           record in a file as deleted.  If you really want to delete all
  5135.           records in a file, use the following Record Selection Criteria:
  5136.           
  5137.                               RECNO() >= 1
  5138.           
  5139.           This expression specifies ALL RECORDS in the file for WAMPUM.
  5140.           
  5141.           
  5142.           3.7   Reserved Variables, dBASE & Clipper Functions                                    _____   _______          
  5143.           
  5144.           3.7.1  Overview
  5145.           
  5146.                In addition to a number of reserved functions provided in
  5147.           the standard implementation of the dBASE III programming
  5148.           language, WAMPUM adds all Clipper enhancements plus some new
  5149.           functions of its own.  This section is designed to bring you up
  5150.           to speed on these new functions and some of the major dBASE III
  5151.           commands and functions.  It is by no means an exhaustive
  5152.           treatment of all dBASE III functions.  Consult any of the dBASE
  5153.           III reference books in your local bookstore for more information
  5154.           on the dBASE III commands and functions.
  5155.           
  5156.           
  5157.           3.7.2  CHARACTER/STRING functions
  5158.           
  5159.                Character string manipulation becomes critical in producing
  5160.           meaningful reports and form letters.  WAMPUM provides a rich
  5161.           assortment of functions to assist the developer.  As is true of
  5162.           all functions, each contains a keyword followed by parentheses, 
  5163.           one or more arguments separated by commas, and closing
  5164.           parentheses.
  5165.           
  5166.  
  5167.  
  5168.  
  5169.                                        - 76 -
  5170.  
  5171.  
  5172.  
  5173.  
  5174.  
  5175.  
  5176.                AT(exp1,exp2) allows a search of the second string
  5177.           expression for the first occurrence of the first expression. A
  5178.           numeric value is returned for the character position of the first
  5179.           match.  For example, AT("son","Thompson") would return 6. If no
  5180.           match is found, a 0 is returned.
  5181.           
  5182.                CHR(n) returns an ASCII character represented by ASCII code
  5183.           n.  For example, CHR(27) is the escape code.
  5184.           
  5185.                SPACE(n) allows the generation of n spaces where n is a
  5186.           numeric value.  For example SPACE(5) produces 5 spaces.
  5187.           
  5188.                STR(exp1,n,dec) converts a numeric expression (exp1)into a
  5189.           string expression n characters long with dec decimals.  For
  5190.           example, STR(153.123,5,1) would yield "153.1".
  5191.           
  5192.                SUBSTR(exp1,n,len) permits extraction of a portion of a
  5193.           string from a larger string. n is a numeric specifying the
  5194.           starting position in the exp1 string. len is a numeric specifying
  5195.           the number of characters to extract from the starting position.
  5196.           For example, SUBSTR("Thompson",3,2) would return "om" which is 2
  5197.           characters beginning at character position 3.
  5198.           
  5199.                TRIM(exp1) tells WAMPUM to trim off trailing spaces from a
  5200.           character string.  For example, if a 30 character NAME field
  5201.           contained "John Jones                    " then TRIM(NAME) would
  5202.           yield "John Jones" with no trailing spaces.
  5203.           
  5204.                UPPER(exp1) converts a string expression to all UPPERCASE.
  5205.           The converse is LOWER(exp1) which does the opposite.
  5206.           
  5207.                VAL(exp1) returns a numeric value for the exp1 string.  For
  5208.           example, VAL("02345") would return the integer 2345.
  5209.           
  5210.           
  5211.           3.7.3  DATE functions
  5212.           
  5213.                WAMPUM supports the dBASE III function for today's date
  5214.           which is DATE() as well as the reserved word TODAY which also is
  5215.           today's date in date format.
  5216.           
  5217.                The standard dBASE III means of converting a date to a
  5218.           character string is supported.  DTOC(DATE()) would convert
  5219.           today's date to a character string in the format 06/12/86. The
  5220.           converse also works to convert a string to a date:
  5221.           CTOD("06/12/86") would convert the string to a date variable.
  5222.           
  5223.                Several DAY functions are available including CDOW() which
  5224.           outputs the actual day of the week such as Monday; DAY() which
  5225.           produces a numeric representing the day of the month such as 31;
  5226.           DOW() which produces a numeric representing the day of the week
  5227.           such as 5.  Note that an empty date field always produces DOW
  5228.           equal to 0.  This is a good way of testing for blank dates.
  5229.           
  5230.  
  5231.  
  5232.  
  5233.  
  5234.  
  5235.                                        - 77 -
  5236.  
  5237.  
  5238.  
  5239.  
  5240.  
  5241.  
  5242.                Several MONTH functions also are available.  MONTH() outputs
  5243.           a numeric representing the month of the year such as 2. CMONTH()
  5244.           generates the actual name of the month such as February.
  5245.           
  5246.                dBASE III also supports YEAR() which outputs a 4-digit
  5247.           numeric value representing the year such as 1987.
  5248.           
  5249.                Clipper provides a date-to-string conversion function with
  5250.           the DTOS() command.  The syntax is DTOS(FILINGDT).  Assuming a
  5251.           filing date of 10/10/85, DTOS(FILINGDT) would output the string 
  5252.           "19851010".  This function is particularly helpful in building
  5253.           indexes where a date field is converted to a string, but the
  5254.           developer wishes to preserve the proper ordering of dates.
  5255.           
  5256.                In producing reports and labels, you can reformat a date
  5257.           field into a standard date character string using the WAMPUM
  5258.           function FULLDATE().  The syntax is FULLDATE(FILINGDT) assuming
  5259.           FILINGDT was a date field in your data base.  If the filing date
  5260.           were 10/20/85, FULLDATE(FILINGDT) would output October 20, 1985.
  5261.           
  5262.                In some applications, it may be desirable to roll a date
  5263.           over to Monday if it hits on a weekend.  WAMPUM's WEEKDAY()
  5264.           function does this.  Assuming a filing date of 06/14/86 hits on a
  5265.           Saturday, the expression WEEKDAY(FILINGDT) would return a date
  5266.           expression with a value of 06/16/86 which is the following
  5267.           Monday. Note that this function could be combined with a previous
  5268.           one to produce a standard text date:FULLDATE(WEEKDAY(FILINGDT)).
  5269.           
  5270.           
  5271.           
  5272.           3.7.4  DUPKEY("FIELDNAME") prevents duplicate keys
  5273.           
  5274.                When building the EDIT.DBF edit checks, many users expressed
  5275.           a desire to be able to test whether the key field of the record
  5276.           being added to a data base already existed and, if so, to return
  5277.           an error. This is critical if you will be using the AUDIT TRAIL
  5278.           function. The DUPKEY function of WAMPUM provides this capability.
  5279.           In order to use it, the following conditions must be met.  First,
  5280.           the key field to be checked must be indexed.  Second, that index
  5281.           must be the primary (first) index in use when the file is ADDed
  5282.           to or EDITed.  Finally, the name of the key field must be
  5283.           specified in parentheses and quotation marks as an edit check in
  5284.           the EDIT.DBF file.  The syntax is shown in the following example
  5285.           using PARTNO as the name of the indexed key field which is to be
  5286.           checked:
  5287.           
  5288.                               DUPKEY("PARTNO")
  5289.           
  5290.                     
  5291.           
  5292.           
  5293.           3.7.5  EMPTY(fieldname) tests for empty fields
  5294.           
  5295.                EMPTY(FieldName) returns a logical True if a character,
  5296.           memo, or date field is empty, or if a numeric field is 0, or if a
  5297.           logical field is False.  Otherwise, a logical False is returned.
  5298.  
  5299.  
  5300.  
  5301.                                        - 78 -
  5302.  
  5303.  
  5304.  
  5305.  
  5306.  
  5307.  
  5308.           3.7.6  LASTTIME field in data bases
  5309.           
  5310.                If LASTTIME is included as a Character-type field in any
  5311.           data base, WAMPUM will automatically post the current time to
  5312.           this field whenever a record is ADDed or EDITed in that data
  5313.           base.  This provides a convenient method of determining when
  5314.           records were last updated with no user control over the field
  5315.           contents.
  5316.           
  5317.           
  5318.           3.7.7  LASTUPDT field in data bases
  5319.           
  5320.                If LASTUPDT is included as a Date-type field in any data
  5321.           base, WAMPUM will automatically post the current date to this
  5322.           field whenever a record is ADDed or EDITed in that data base. 
  5323.           This provides a convenient method of determining when records
  5324.           were last updated with no user control over the field contents.
  5325.           
  5326.           
  5327.           3.7.8  LASTUSER field in data bases
  5328.           
  5329.                If LASTUSER is included as a Character-type field in any
  5330.           data base, WAMPUM will automatically post the current USERID to
  5331.           this field whenever a record is ADDed or EDITed in that data base
  5332.           if the SET USERID=X line has been added to the AUTOEXEC.BAT file
  5333.           for each network user.  This provides a convenient method of
  5334.           determining who screwed up what with no user control over the
  5335.           field contents.  Please note that before using the SET USERID=X
  5336.           command, you must first create a USERS data base and index with
  5337.           the names and passwords of those authorized access to WAMPUM.
  5338.           
  5339.           
  5340.           3.7.9  MEMOTRAN(fieldname) outputs MEMO fields
  5341.           
  5342.                MEMOTRAN(FieldName) is a Clipper function designed to assure
  5343.           that MEMO fields are output correctly in reports.  See the
  5344.           discussion in the Reports section of this User's Guide.
  5345.           
  5346.           
  5347.           3.8   PATH considerations 
  5348.           
  5349.                Whenever WAMPUM is started, part of its initialization
  5350.           process includes reading the DOS PATH which then becomes WAMPUM's
  5351.           PATH as well.  For this reason, developers need to be careful NOT
  5352.           to build WAMPUM applications in a directory which is part of the
  5353.           DOS PATH since all of the files in this directory then would be
  5354.           accessed by other WAMPUM applications.  What should be stored in
  5355.           a directory supported by the DOS PATH command are the following
  5356.           files: WAMPUM.EXE, REPORT.EXE, LABEL.EXE, and the printer config
  5357.           files such as HPLASERA.MEM, HPLASERB.MEM, and EPSON.MEM.  This
  5358.           will make all of these files accessible to users in any WAMPUM
  5359.           subdirectory.  
  5360.           
  5361.                The only exception to these guidelines might be in
  5362.           situations in which a related file and its index need to be
  5363.           shared with several different applications.  In this case, just
  5364.  
  5365.  
  5366.  
  5367.                                        - 79 -
  5368.  
  5369.  
  5370.  
  5371.  
  5372.  
  5373.  
  5374.           the related file and index should be placed in a directory
  5375.           supported by the DOS PATH command, NOT the configuration files
  5376.           for the WAMPUM application itself.  If you don't understand this
  5377.           exception, don't use it.
  5378.           
  5379.           
  5380.           3.9   Enabling USERID's and Passwords
  5381.           
  5382.                WAMPUM now may be configured to require those accessing
  5383.           files through WAMPUM to log in with a USERID and PASSWORD. 
  5384.           Typically this would be used for network applications if the
  5385.           network itself does not provide adequate protection. The USERID-
  5386.           PASSWORD system also may be invoked in single-user applications. 
  5387.           
  5388.                Step 1 to force use of the USERID-PASSWORD system is to
  5389.           create a data base which will store the user names and passwords
  5390.           of those authorized to utilize WAMPUM.  Create a new subdirectory
  5391.           on your hard disk and run WAMPUM in Developer Mode.  Then Build A
  5392.           New File and name it USERS.  Two fields must be created in this
  5393.           file structure. Two additional fields are optional.  The two
  5394.           mandatory fields are USER and PASSWORD.  Both fields must be
  5395.           Character-type fields with a field length of 8. The optional
  5396.           fields are SUPERVISOR, which must be a Logical field of length 1,
  5397.           and CONFIG, which must be a character field of length 8.
  5398.           
  5399.                Once you have built the new data base, use File Select to
  5400.           place the USERS file in use.  Then use Index Select/Create to
  5401.           build an index on the USER field.  You then are ready to ADD
  5402.           records to the data base for each anticipated user.  For each
  5403.           user, you must include a user name and password.  THESE ENTRIES
  5404.           BOTH MUST BE IN ALL UPPER CASE LETTERS!  Once you have added all
  5405.           the entries desired, exit to the DOS level and copy USERS.DBF and
  5406.           USER.NTX into a directory which is part of the DOS path.  This
  5407.           will enable WAMPUM to find the files whenever an attempt is made
  5408.           to run WAMPUM.  Assuming your \DOS subdirectory is part of the
  5409.           path, a simple command to copy the files would be as follows:
  5410.           
  5411.                               COPY USER*.* \DOS
  5412.           
  5413.                Whenever you wish to add new users, move to the directory in
  5414.           which you established the original copy of the file (NOT the
  5415.           directory which is part of the DOS PATH!).  Add whatever new
  5416.           entries are desired, and then recopy the file to the same
  5417.           directory sharing the DOS PATH which was used previously.
  5418.           
  5419.                If you accidentally get tangled up to the point that you
  5420.           cannot get into WAMPUM, you can turn OFF the password feature by
  5421.           disabling the USERID variable in the environment.  To do this,
  5422.           exit to DOS and type the following command at the DOS prompt:
  5423.           
  5424.                               SET USERID=
  5425.           
  5426.                If the SUPERVISOR field is used and is marked True for a
  5427.           given user, then WAMPUM automatically will be started in
  5428.           Developer mode for that user.  This means that the expanded menu
  5429.           of 21 options will be displayed for this user.
  5430.  
  5431.  
  5432.  
  5433.                                        - 80 -
  5434.  
  5435.  
  5436.  
  5437.  
  5438.  
  5439.  
  5440.           
  5441.                If the CONFIG field is used, then the developer may specify
  5442.           a configuration file for use by each user.  This configuration
  5443.           file takes the place of WAMPUM.MEM which will be used unless the
  5444.           CONFIG field is used and has an entry. The process for generating
  5445.           these individual configurations is quite simple.  Create a new
  5446.           WAMPUM configuration as you normally would using the * - Config
  5447.           Update option.  Then exit to DOS and copy the WAMPUM.MEM file
  5448.           which was created to a new filename making certain that the file
  5449.           extension remains .MEM. Then edit the USERS data base and add an
  5450.           appropriate CONFIG file name for the users desired.  
  5451.           
  5452.                For example, let's assume there is a USER named Jones.  We
  5453.           want that user's CONFIG file to be named JONES.MEM.  Run WAMPUM
  5454.           in Developer Mode and configure the application in the normal
  5455.           manner.  Now exit to DOS and type COPY WAMPUM.MEM JONES.MEM.
  5456.           Revise Jones' entry in the USERS data base to reflect a CONFIG
  5457.           field value of JONES.  That's all there is to it.
  5458.           
  5459.           
  5460.           3.10  WAMPUM & DOS System Errors
  5461.           
  5462.                WAMPUM System Errors are error conditions caused by one of
  5463.           three conditions: (1) a DOS-error is detected, (2) a Clipper
  5464.           error is detected, or (3) the abort program key (ALT-C) is
  5465.           pressed by the user.  In any of these three situations, a system
  5466.           error message appears on the top line of the screen followed by a
  5467.           prompt.  Simply follow the directions to proceed.
  5468.  
  5469.  
  5470.           3.11  Credits
  5471.           
  5472.                The following are trademarks or registered trademarks of the
  5473.           respective companies:
  5474.           
  5475.                Clipper                                 Nantucket Corp. 
  5476.                dBASE, dBASE III, and dBASE III Plus    Ashton-Tate
  5477.                LOTUS, 1-2-3, and Symphony              LOTUS Development Co
  5478.                IBM, IBM PC, and IBM PC-AT              IBM Corporation
  5479.                HP LaserJet, Plus, and LaserJet II      Hewlett Packard
  5480.  
  5481.  
  5482.           
  5483.                                        - 81 -